views:

28

answers:

1

I have all my data bound 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?

+1  A: 

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...

Rob Fonseca-Ensor