beta.blog

WPF: Application.DoEvents()

by on Apr.19, 2012, under Programming

This is a small hack allowing you to use something such as Application.DoEvents() in your WPF application:

if (Application.Current != null)
  Application.Current.Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Background, new ThreadStart(delegate { }));

Leave a Reply

*

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!