C# Metro App UI update

前端 未结 1 1060
情歌与酒
情歌与酒 2021-01-07 11:23

My problem is just the same as this link.

I am working on the new WinRT for Metro Applications in C#(win8 release preview). The p

相关标签:
1条回答
  • 2021-01-07 12:12

    Somewhere in your UI thread run :

    CoreDispatcher dispatcher = Windows.UI.CoreWindow.GetForCurrentThread().Dispatcher;
    

    Then from your background thread call the RunAsync function in the dispatcher variable you just created.

    dispatcher.RunAsync(DispatcherPriority.Normal, <delegate to run on UI thread>);
    
    0 讨论(0)
提交回复
热议问题