new APIs for windows phone 8.1

后端 未结 4 443
小蘑菇
小蘑菇 2021-02-05 22:23

I am trying to use these two methods (of WP 8) in windows phone 8.1, but it gives error and doesn\'t compile, most probably becasue they are removed. I tried searching the new A

4条回答
  •  野的像风
    2021-02-05 22:52

    For Dispatcher, try this. MSDN

    private async Task MyMethod()
    {
        await Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () => { });
    }
    

    For Thread.Sleep() try await Task.Delay(1000). MSDN

提交回复
热议问题