Why is the protection of CollectionView.CollectionChanged protected?

I want to track changes in CollectionView, but the CollectionChanged event is protected. How can I do it? Of course, there must be a way to subscribe to this event - the list controls should do it somehow.

I can use SourceCollection for INotifyCollectionChanged and add an event there, but that seems useless.

+5
source share
2 answers

... list controls should do it somehow.

I can use SourceCollection for INotifyCollectionChanged and add an event there, but this seems unnecessary messy.

, . ItemsControl ( http://www.dotnetframework.org/):

((INotifyCollectionChanged)_items).CollectionChanged += new NotifyCollectionChangedEventHandler(OnItemCollectionChanged);

, CollectionViews ICollectionView, INotifyCollectionChanged, CollectionView, CurrentItem.

+3

ObservableCollection?

+1

All Articles