I have an ObservableCollection, this collection has 2 items (model), the model has Value as a property.
there is an event CollectionChanged for the collection, which suppose to fire when an item is changed, so I am expecting to see this event get fire when a model Value sets but I don’t how model should be structured to fire that event?
I know that Model can have an event and when a Model is added a handler can be assigned to this event, but I want to know how CollectionChanged works for change of item in the collection?
CollectionChangedwill only be raised when a model replaces another in your collection. Property changes to a model that is already inside the collection will not raise it.You will need to handle those with the
INotifyPropertyChanged.PropertyChangedevent, which your models must expose.