Two comboboxes with the same CollectionViewSource ItemSource update each other

寵の児 提交于 2019-12-04 02:56:38

This is normal, CollectionViews have a CurrentItem and if the ItemsSource is a CollectionView they get synchronized, see IsSynchronizedWithCurrentItem:

true if the SelectedItem is always synchronized with the current item in the ItemCollection; false if the SelectedItem is never synchronized with the current item; null if the SelectedItem is synchronized with the current item only if the Selector uses a CollectionView. The default value is null.

So you can just turn it off manually by setting that property to false.

(By the way, you can also bind to the CurrentItem of a CollectionView via a slash. e.g. People/Name binds to the Name property of the current person in People.)

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