Dispatching to the UI Thread in Win8 'Metro'

by JasonRShaver 15. August 2012 17:07

It took me WAY to long to find this out, so I am hoping this post helps Google/Bing provide the answer to others.

If you are used to using the following command to dispatch to the UI thread in Silverlight:

Deployment.Current.Dispatcher.BeginInvoke(action);

You are going to have to learn to love the new method:

Windows.ApplicationModel.Core.CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, new Windows.UI.Core.DispatchedHandler(action));

 

 

Tags: , , , , ,

Blog

About the author

I am a software developer working for Microsoft in Redmond, WA.  In addition, my wife and I own TTXOnline, what is likely the 3rd largest table tennis store in the US.

Month List

Page List