How to apply a Filter to a PagedCollectionView but prevent CollectionChanged event from firing on edit?

淺唱寂寞╮ 提交于 2019-12-05 12:23:17

It looks like I have finally found the answer. The solution is to not listen to the CollectionChanged event of the PagedCollectionView, but to listen to the CollectionChanged event of the PagedCollectionView.SourceCollection. In my case, this is an ObservableCollection, so it actually has a CollectionChanged event.

In order for me to figure this out, I needed to realize that the PagedCollectionView should really be thought of as a view that wraps around a collection, rather than just another type of collection that I can use. Looking at it this way, it is pretty obvious that you want to look for changes in the underlying collection, not in the view. Once you have figured it out, it's all pretty obvious really :-)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!