Why is ReadOnlyObservableCollection.CollectionChanged not public?

后端 未结 8 2108
心在旅途
心在旅途 2021-01-31 06:50

Why is ReadOnlyObservableCollection.CollectionChanged protected and not public (as the corresponding ObservableCollection.CollectionChanged is)?

What is the use of a col

8条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-31 07:37

    Here's the solution: CollectionChanged events on ReadOnlyObservableCollection

    You have to cast the collection to INotifyCollectionChanged.

提交回复
热议问题