Hi
This is a little snippet of my code
<s:SciChartSurface SeriesSource="{Binding ChartSeries}"
YAxes="{Binding YAxisCollection}"
XAxis="{Binding XAxis}"
Annotations="{Binding AnnotationCollection}"
s:HorizontalGroupHelper.HorizontalChartGroup="horizontalChartGroup">
I would like to be able to set throught my ViewModel the “syncWidthGroup” of the HorizontalChartGroup like this.
s:HorizontalGroupHelper.HorizontalChartGroup="{Binding ChartGroup}"
But an exception is thrown saying I can only bind to DP og DO.
System.Windows.Markup.XamlParseException occurred
HResult=-2146233087
Message=A 'Binding' cannot be set on the 'SetHorizontalChartGroup' property of type 'SciChartSurface'. A 'Binding' can only be set on a DependencyProperty of a DependencyObject.
Source=PresentationFramework
LineNumber=14
LinePosition=324
StackTrace:
at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)
at System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri)
at System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream)
at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
at Sekal.DrillScene.Desktop.Application.Views.TrackView.InitializeComponent() in c:\dev\projects\SekalApplications\Client\Sekal.DrillScene.Desktop\obj\Debug\decoratedxaml\Application\Views\TrackView.xaml:line 1
at Sekal.DrillScene.Desktop.Application.Views.TrackView..ctor() in c:\dev\projects\SekalApplications\Client\Sekal.DrillScene.Desktop\Application\Views\TrackView.xaml.cs:line 10
InnerException:
So how would I go about doing this through code and not xaml, as I use ViewModel first approach and ViewModels are dynamically appended to an Items collection? (Using Caliburn.Micro)
- Sander Struijk asked 9 years ago
- last edited 9 years ago
- You must login to post comments
Hi Sander,
Yuriy has fixed this indeed, but forgot to run the Nightly Build team city job. This has been done now, and the fix is available right now in v3.1.0 revision 5452
Best regards,
Andrew
- Andrew Burnett-Thompson answered 9 years ago
-
The NuGet package has not been updated with the new version yet, could you guys push the changes? :D
-
The screenshot and link above says it has - have you tried updating to build 5452 using package manager console?
-
I was able to get the correct version with the command: Install-Package SciChart -Version 3.1.0.5452 But not with the NuGet Explorer https://www.dropbox.com/s/h9crhlrumz02fd6/Screenshot%202014-12-04%2012.53.37.png?dl=0
-
I can confirm that the fix works :D
- You must login to post comments
Please login first to submit.