I\'ve read that the C# version is as follows:
Application.Current.Dispatcher.Invoke( DispatcherPriority.Background, new Action(delegate {
You could simply call this method if you want something to be refreshed on the UI:
System.Windows.Forms.Application.DoEvents
We are using it on our WPF Window and XBAP applications.