I am sure I am missing something, but I am not seeing any updates to my ViewModel for any selection changes. I am getting the SelectionChanged Event in my code behind (which I don't want, I put it there for testing), but nothing through the binding. When I breakpoint on the event, and I look at the chart, the SelectedPoints property has the proper points in it. Relevant things shown below.
<telerik:RadCartesianChart x:Name="chart" Palette="Autumn" SelectedPoints="{Binding SelectedDataPoints, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">
....
<telerik:RadCartesianChart.Series>
<chartView:BarSeries ItemsSource="{Binding rgs}" PaletteMode="DataPoint" IsHitTestVisible="True" CategoryBinding="Name"
ValueBinding="Count">
<chartView:BarSeries.PointTemplate>
<DataTemplate>
<Rectangle Fill="{Binding Converter={StaticResource GoodToBad}}" />
</DataTemplate>
</chartView:BarSeries.PointTemplate>
</chartView:BarSeries>
</telerik:RadCartesianChart.Series>
....
<telerik:RadCartesianChart.Behaviors>
<telerik:ChartSelectionBehavior DataPointSelectionMode="Single" SelectionChanged="ChartSelectionBehavior_SelectionChanged" />
</telerik:RadCartesianChart.Behaviors>
and in my view model:
private ReadOnlyDataPointCollection _dataPoints = null;
public ReadOnlyDataPointCollection SelectedDataPoints
{
get { return _dataPoints; }
set
{
_dataPoints = value;
RaisePropertyChanged(() => SelectedDataPoints);
}
}
There are no binding errors showing in the output window, and the "get" property on the SelectedDataPoints property in my view model is getting hit. But never the set.
What am I missing?
Thank
Paul
<telerik:RadCartesianChart x:Name="chart" Palette="Autumn" SelectedPoints="{Binding SelectedDataPoints, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">
....
<telerik:RadCartesianChart.Series>
<chartView:BarSeries ItemsSource="{Binding rgs}" PaletteMode="DataPoint" IsHitTestVisible="True" CategoryBinding="Name"
ValueBinding="Count">
<chartView:BarSeries.PointTemplate>
<DataTemplate>
<Rectangle Fill="{Binding Converter={StaticResource GoodToBad}}" />
</DataTemplate>
</chartView:BarSeries.PointTemplate>
</chartView:BarSeries>
</telerik:RadCartesianChart.Series>
....
<telerik:RadCartesianChart.Behaviors>
<telerik:ChartSelectionBehavior DataPointSelectionMode="Single" SelectionChanged="ChartSelectionBehavior_SelectionChanged" />
</telerik:RadCartesianChart.Behaviors>
and in my view model:
private ReadOnlyDataPointCollection _dataPoints = null;
public ReadOnlyDataPointCollection SelectedDataPoints
{
get { return _dataPoints; }
set
{
_dataPoints = value;
RaisePropertyChanged(() => SelectedDataPoints);
}
}
There are no binding errors showing in the output window, and the "get" property on the SelectedDataPoints property in my view model is getting hit. But never the set.
What am I missing?
Thank
Paul