为什么ReadOnlyObservableCollection.CollectionChanged不会公开? [英] Why is ReadOnlyObservableCollection.CollectionChanged not public?
问题描述
为什么 ReadOnlyObservableCollection.CollectionChanged
受保护且不公开(作为相应的 ObservableCollection.CollectionChanged
is)?
使用集合实现 INotifyCollectionChanged如果我无法访问
CollectionChanged
事件
以下是解决方案: ReadOnlyObservableCollection上的CollectionChanged事件
您必须将集合强制转换为 INotifyCollectionChanged / p> Why is What is the use of a collection implementing Here's the solution: CollectionChanged events on ReadOnlyObservableCollection You have to cast the collection to INotifyCollectionChanged. 这篇关于为什么ReadOnlyObservableCollection.CollectionChanged不会公开?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!ReadOnlyObservableCollection.CollectionChanged
protected and not public (as the corresponding ObservableCollection.CollectionChanged
is)?INotifyCollectionChanged
if I can't access the CollectionChanged
event?