Friday, April 16, 2010

WPF Threads: Dispatcher

Apparently WPF framework became a bit smarter in terms of threads comparing to Windows Forms.There is Dispatcher.

Now you might be forced to queue UI actions like this:

Dispatcher.Invoke(DispatcherPriority.Send, new ThreadStart(() =>
MyTree.SelectedItem = folderToEdit;

Another example for single no parameter function:

Dispatcher.BeginInvoke(new Action(() =>


Post a Comment