what is notifycollectionchangedaction reset value

后端 未结 3 1001
一整个雨季
一整个雨季 2020-12-06 16:22

I have an observable collection...SelectableDataContext..And in the generic class SelectableDataContext is...having two private m

3条回答
  •  孤城傲影
    2020-12-06 17:20

    There is a difference between INotifyCollectionChanged and INotifyPropertyChanged.

    When a value of a propery in an object changes, it should notify others using INotifyPropertyChanged interface implementation.

    On the other hand, when number of items or items themselves change in a collection, it should let others know using INotifyCollectionChanged implementation.

    Now, in your case, value of a property of an object in your collection changes. That is supposed to raise PropertyChanged event, not CollectionChanged event.

提交回复
热议问题