Another good use for Dispatcher.Invoke
is for immediately updating the UI in a function that performs other tasks:
// Force WPF to render UI changes immediately with this magic line of code...
Dispatcher.Invoke(new Action(() => { }), DispatcherPriority.ContextIdle);
I use this to update button text to "Processing..." and disable it while making WebClient
requests.