Binding should check for cross thread calls - by michiproep

Status : 

  Not Reproducible<br /><br />
		The product team could not reproduce this item with the description and steps provided.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 624517 Comments
Status Closed Workarounds
Type Suggestion Repros 0
Opened 11/25/2010 12:27:41 AM
Access Restriction Public


WPF Binding should check for cross thread calls:
Let's say you have your GUI bound to your Model or ViewModel (MVVM) and a seperate thread checks for changes and updates the properties in the model, it would fire NotifyPropertyChanged in that second thread. The consequence is that a cross-thread-exception occurs.
Yes, you could implement a dispatcher mechanism in your model but what if the model is generated i.e. EntityFramework?
It would be easier and safer if the binding class does would implement the
"if(InvokeRequired)-pattern" itself!
Sign in to post a comment.
Posted by Dwayne [MSFT] on 4/8/2011 at 11:26 AM
Models may be manipulated on other threads, and the WPF Binding system already marshals the property changes to the UI thread. This has been like this for a very long time, so you must be experiencing some other problem. Please provide a repro if you need to reactivate this issue.

Of course, if the model itself has thread affinity than it can not be manipulated from a foreign thread.

Currently released versions of WPF do not marshal collection changes across threads, which is a well known limitation.
Posted by Microsoft on 11/25/2010 at 1:21 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(