Change the PointCollections property to the dependency property:
public PointCollection Pts { get { return (PointCollection)GetValue(PtsProperty); } set { SetValue(PtsProperty, value); } } // Using a DependencyProperty as the backing store for Pts. This enables animation, styling, binding, etc... public static readonly DependencyProperty PtsProperty = DependencyProperty.Register("Pts", typeof(PointCollection), typeof(ViewModel), new UIPropertyMetadata(new PointCollection()));
By the way. You do not need to fire the PropertyChanged event.
Sorry, and your object should inherit from DependencyObject
public class ViewModel : DependencyObject {
Carlo source share