WinRT中的全球调度程序? [英] Global Dispatcher in WinRT?

查看:41
本文介绍了WinRT中的全球调度程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些看起来像这样的WP7代码:

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; } }
}

WinRT中的等效项是什么?没有全局可访问的Dispatcher(或CoreDispatcher)对象吗?

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

推荐答案

您将要使用Window.Current.Dispatcher.

这篇关于WinRT中的全球调度程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆