【发布时间】:2016-07-27 15:52:37
【问题描述】:
我有一个使用 C# 和 XAML 在 Windows 8 手机上的警报应用程序。当我在应用程序运行时收到通知时,我能够使用此代码更新 UI。
private void PushChannel_ShellToastNotificationReceived(object sender, NotificationEventArgs e)
{
Dispatcher.BeginInvoke(async () =>
{
Textboc.text = "Something";
});
}
但是,我现在已将我的应用程序移至 Windows 10 Universal。 Dispatcher.BeginInvoke 似乎不可用。有没有其他方法可以用来更新 UI?
【问题讨论】:
标签: c# multithreading xaml windows-10-universal