In a WPF app that I\'m writing using the MVVM pattern, I have a background process that doing it\'s thing, but need to get status updates from it out to the UI.
This is more of an extension to the accepted answer but I did this with my event hander ...
using System.Threading;
private void Handler(object sender, RoutedEventArgs e)
{
if (Thread.CurrentThread == this.Dispatcher.Thread)
{
//do stuff to this
}
else
{
this.Dispatcher.Invoke(
new Action