Search code examples
xamlwindows-8microsoft-metrowindows-runtimewinrt-xaml

Global Dispatcher in WinRT?


I have some WP7 code that looks like this:



using System.Windows;
using System.Windows.Threading;

public static class GlobalDispatcher
{
    public static Dispatcher Current { get { return Deployment.Current.Dispatcher; } }
}

What is the equivalent in WinRT? Is there no globally accessible Dispatcher (or CoreDispatcher) object?


Solution

  • You will want to use Window.Current.Dispatcher.