Created
April 18, 2013 10:40
-
-
Save janbaer/5411800 to your computer and use it in GitHub Desktop.
DoEvents in Wpf applications
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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