Pages

Your Ad Here

Tuesday, 5 October 2010

Observable Collection

ObservableCollection is very important feature of data binding in WPF.
It is like a regular collection other than it can raise two more events. Which are INotifyCollectionChanged and INotifyPropertyChanged events. As the name suggests when collection is changed (item is added or removed) then INotifyCollectionChanged event will be raised.

If a property is changed in collection or count of collection is changed then INotifyCollectionChanged event is raised.



For more details you can try here:
http://www.e-pedro.com/2009/04/an-introduction-to-observablecollection-in-wpf/

INotifyPropertyChanged interface is implemented with method OnPropertyChanged().
This method will notify to UI (xaml) that this property is changed.

No comments: