In Silverlight and WPF, if you wanted to update the UI from a thread you had launched, it was important that the UI update be executed on the UI thread, lest you get an invalid-cross-thread-access error.
You could ensure this by initially getting a pointer to the dispatcher for the UI thread, and then asking it to run your code. Something like this:
_OriginalDispatcher = Application.Current.RootVisual.Dispatcher;
_OriginalDispatcher.BeginInvoke(myAction);
Read more: Yet Another Coding Blog
QR: