0
kicks
Creating a Custom Observable Collection in WPF | UX and WPF ramblings
One of the biggest advantadges WPF has is its Data Binding features. Data Binding can be done in several ways, but the most common is using the INotifyPropertyChanged and INotifyCollectionChanged interfaces. For simple objects, all you need to do is implement the INotifyPropertyChanged, and raise the PropertyChanged event when your properties change. When you want to bind to a collection, you will want to use ObservableCollection<T>. This collection implements both interfaces, therefore notifying you when the items in the collection change and when the items' properties change. This works great if you're using standard collections. The problem arises when you want to use a custom collection. For databinding to work with custom collections, you will have to create a new "Observable" wrapper around it.