1

I am planning to introduce threading in my WPF application. I know that any operation on ObservableCollection (like add and remove) needs to be done on a UI thread.

But can I change the value of a property of a bound object present inside the ObservableCollection / bound to the UI on a background thread?

Marc
  • 12,164
  • 6
  • 56
  • 94
Ganesh R.
  • 4,312
  • 3
  • 26
  • 45
  • 1
    Good answer here: http://stackoverflow.com/questions/2980642/why-isnt-it-possible-to-update-an-observablecollection-from-a-different-thread – sa_ddam213 Mar 14 '13 at 10:02
  • @sa_ddam213 The post talks about ObservableCollections. Can I update property values from non UI threads? – Ganesh R. Mar 14 '13 at 10:27
  • You can; the binding engine takes care of invoking the code that updates the bound properties on the UI thread. You can also try it yourself and see that it works. – Jon Mar 14 '13 at 10:38

0 Answers0