Skip to content

Instantly share code, notes, and snippets.

@janbaer
Created April 18, 2013 10:40
Show Gist options
  • Save janbaer/5411800 to your computer and use it in GitHub Desktop.
Save janbaer/5411800 to your computer and use it in GitHub Desktop.
DoEvents in Wpf applications
public static class WpfApplicationExtensions
{
public static void DoEvents(this Application application)
{
if (application != null)
{
application.Dispatcher.Invoke(DispatcherPriority.Background, new ThreadStart(delegate { }));
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment