Best place to check is in the documentation:
PointCollection Class (System.Windows.Media) | Microsoft Docs[
^]
If you're looking a using the MVVM Design Pattern, then you're looking at using
Data Binding (WPF) | Microsoft Docs[
^] . For Data Binding to work with XAML, you need to hook into the data binding notification syste. Looking at the
PointCollection
code from the link above, it does not do this:
[System.ComponentModel.TypeConverter(typeof(System.Windows.Media.PointCollectionConverter))]
public sealed class PointCollection : System.Windows.Freezable, IFormattable, System.Collections.Generic.ICollection<System.Windows.Point>, System.Collections.Generic.IEnumerable<System.Windows.Point>, System.Collections.Generic.IList<System.Windows.Point>, System.Collections.IList
What you need to do is write a Proxy class wrapper for the
PointCollection
class that implements both the
System.Collections.Specialized.INotifyCollectionChanged
and
System.ComponentModel.INotifyPropertyChanged
interfaces for Data Binding to work properly.
To see an example of this, take a look at the data binding collection
ObservableCollection<T> Class (System.Collections.ObjectModel)[
^].