[COMException] INotifyPropertyChanged and LineSeries

May 21, 2013 at 10:21 AM
Edited May 21, 2013 at 10:38 AM
Hi !
First of all thank you for this great toolkit. It's an impressive work !

I'm currently using the line chart, and I'm facing a problem : everything goes right, but if I my (In)DependentValue which is bound to my LineSeries contains a change notification (INotifyPropertyChanged), the toolkit raise a COMException.

I've found this thread which said that this bug should be already resolved ? I used the last version (1.4.1) of the toolkit from Nuget.

My XAML code :
<toolkitchart:Chart x:Name="AltitudeChart" Height="200">
                        <Style TargetType="FrameworkElement">
                            <Setter Property="Width" Value="0"/>
                        IndependentValueBinding="{Binding Distance}"
                        DependentValueBinding="{Binding Distance}"
                        DependentRangeAxis="{Binding ElementName=LeftAxis}"
                        IndependentAxis="{Binding ElementName=BottomAxis}">
                            <Style TargetType="toolkitchart:LineDataPoint">
                                <Setter Property="Height" Value="4"/>
                                <Setter Property="Width" Value="4"/>
                                <Setter Property="Template">
                                            <local:DetailedPushpin ManipulationDelta="DetailedPushpin_ManipulationDelta" ManipulationMode="TranslateY"/>
                        <toolkitchart:LinearAxis x:Name="RightAxis" Orientation="Y" Location="Right">
                                <Style TargetType="Line">
                                    <Setter Property="Stroke" Value="White"/>
                        <toolkitchart:LinearAxis x:Name="LeftAxis" Orientation="Y" Location="Left" Foreground="White"/>
                        <toolkitchart:LinearAxis x:Name="BottomAxis" Orientation="X" Location="Bottom" Foreground="White">
                                <Style TargetType="Line">
                                    <Setter Property="Stroke" Value="White"/>
                                    <Setter Property="StrokeThickness" Value="1"/>
And my C# code :
ObservableCollection<AltChartPoint> ChartPoints = new ObservableCollection<AltChartPoint>();
AltChartPoint a = new AltChartPoint(12); 
a.Distance = 13; <-- Throw exception if the change is notified

 public class AltChartPoint : INotifyPropertyChanged
    private double _distance;
    public double Distance 
      get { return _distance; }
        _distance = value;
       //NotifyPropertyChanged("Distance"); <-- Problem is here
Thanks in advance,

EDIT : the same exception occured if i try to edit directly the LineDataPoint.DependentValue
May 23, 2013 at 11:30 AM
Anybody ? :)