Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我将所有数据从 WPF 控件绑定到我的 Window 可以访问的对象中的属性。当我运行后台工作线程时,是否需要调度程序来访问这些底层属性,或者由于我没有显式访问 UI 控件,是否由将 XAML 绑定到代码属性的机制自动处理?
WPF(但不是 silverlight)数据绑定系统会自动将 INotifyPropertyChanged 事件发送到调度程序线程,因此您可以从任何您喜欢的地方触发这些事件。INotifyCollectionChanged 就没有那么幸运了,因此您需要将任何更改发送给您ObservableCollection自己...
ObservableCollection