WPF: Accessing bound ObservableCollection fails althouth Dispatcher.BeginInvoke is used

∥☆過路亽.° 提交于 2019-12-06 07:59:42

We've run into this problem before ourselves. The issue is twofold:

1- Make sure that any changes to the SourceCollection are on the main thread (you've done that).

2- Make sure that the creation of the CollectionView was also on the main thread (if it were created on a different thread, say in response to an event handler, this will not usually be the case). The CollectionView expects modifications to be on "its" thread, AND that "its" thread is the "UI" thread.

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