I was just looking into the difference between BindingList and ObservableCollection following this question: Why NOT BindingList in WPF
As part of this, I tested binding the ItemsSource of an ItemsControl to various types, including List, Collection, ObservableCollection and BindingList.
What surprised me is that the interface updated when either the ObservableCollection or the BindingList were modified, but not when the others were. So what is WPF listening to that causes that update? It can’t be the INotifyCollectionChanged event, as I previously thought, because BindingList does not implement that. Bemused.
Binding list looks like this:
IRaiseItemChangedEvents indicates that the object class converts property change events to ListChanged events
.
BindingListitself has theListChangedevent which is what WPF must be listening to.If fact it looks like IRaiseItemChangedEvents is ignored, but there’s a
BindingListCollectionViewwhich containsand a constructor like
I recommend you get hold of DotPeek and see for yourself.