Hi,
in my application I’m recording values. All parameters are shown in a GridView Control. Now I want to show the RolloverModifier Values in this GridView.
Therefore I make a binding to the SeriesData property to my ViewModel:
In my ChartModel I have the property:
private ChartDataObject _seriesData; public ChartDataObject SeriesData { get { return _seriesData; } set { _seriesData = value; } }
When application starts the property will be set to null. And when I load some values into the graph and move over the RolloverModifier I got an Nullreference exception stacktrace is in the txt file.
Regards Markus
- Rupertsberger Markus asked 10 years ago
- last edited 10 years ago
- You must login to post comments
Hi,
solved it by myself. I make a TwoWay Binding and initialized the property with:
private ChartDataObject _seriesData = new ChartDataObject(new ObservableCollection()); public ChartDataObject SeriesData { get { return _seriesData; } set { _seriesData = value; } }
Then when I move the cursor the SeriesInfos inside the SeriesData are refreshed but there is no notification at the property itself.
Regards Markus
- Rupertsberger Markus answered 10 years ago
- last edited 10 years ago
-
Aha, great find. This is probably related to the Dependency Property Precedence issue we see pop up all over the place. http://msdn.microsoft.com/en-us/library/ms743230(v=vs.110).aspx Somewhere in our code we are probably setting a DP in code which means bindings don't work as expected. TwoWay binding often resolves this issue as our setting of a property in code gets pushed to the ViewModel.
- You must login to post comments
Please login first to submit.