I was learning about ObservableCollections in WPF and something is not clear to me. I understand that if I bind a control to an ObservableCollection and the collection changes, the control will reflect the changes. My questions are:
ObservableCollection implements INotifyCollectionChanged, which is just an event, CollectionChanged. That event should be fired whenever the collection changes but who subscribes to that event? Is it done automatically when you create a binding to the collection?
I was looking at ObservableCollection using Reflector and was trying to see when the CollectionChanged event gets fired. However I couldn't find where it is done. For example, I wanted to see when it was fired when I added a new item to the collection. Add(...) is implemented in ObservableCollection's base class, Collection, but Collection does not implement INotifyCollectionChanged so I don't understand how bound controls are notified of the change.
I am guessing that a lot of this is taken care of under the covers but any info is greatly appreciated.