If I update a property that throws a NotifyPropertyChanged on a thread other than the bound control’s dispatcher is the update forcibly marshalled to this dispatcher?
BackgrounWorker.Run() => { blah.Blahness = 2; // notifies property changed on BW, is this marshalled to the dispatcher? }
Yes, the
PropertyChangedevent is automatically marshalled to the UI dispatcher, so you don’t need to useInvoketo marshall it explicitly.Note that it is only true for change notifications on scalar properties (i.e.
PropertyChangedevent). Collection change notifications (INotifyCollectionChanged.CollectionChangedevent) don’t work that way, they must be raised on the UI thread manually. I wrote a class that does it automatically, you can find it here.