I have all my data boun开发者_JAVA百科d from WPF controls to properties in an object that my Window can access. When I run a backgroundworker thread, do I need a dispatcher to access these underlying properties, or since I'm not explicitly accessing the UI controls, is that handled automatically by the mechanism binding the XAML to the code properties?
The WPF (but not silverlight) databinding system will automatically send INotifyPropertyChanged events to the dispatcher thread, so you can trigger these from wherever you like. INotifyCollectionChanged is not so lucky, so you'll need to dispatch any changes to an ObservableCollection
yourself...
精彩评论