Reputation: 36166
Gosh! I hate this. Why it is so complicated?
What I'm trying to do:
I have a form with several UserControls each with a DataGrid. Each grid bind with ObservableCollection through .ItemSource property, everytime when program catches an event, it makes changes in one of the implied collections. But a picture of a grid doesn't update.
Upvotes: 2
Views: 176
Reputation: 22744
ObservableCollection will not notify the control if a property of the element has changed - unless the element specifically notifies the subscribers through INotifyPropertyChanged.
Why it works this way? A collection is just a container, and while it knows about the number of the elements and when element was added or removed, it does not know "what is inside" of an element and what properties should raise notifications. Even when you implement the INotifyPropertyChanged yourself, you would need to decide changing of which properties should raise the event.
Upvotes: 8