【问题标题】:DrawerLayout in Windows PhoneWindows Phone 中的抽屉布局
【发布时间】:2015-05-09 20:35:02
【问题描述】:

我在库 DrawerLayout 的帮助下在我的 Windows Phone 应用程序中创建了 DrawerLayot。 在模拟器中一切正常。但是当我在手机上运行应用程序时,他起飞了。我注意到了,这发生在调用 Frame.Navigate() 之后。有什么问题?

【问题讨论】:

    标签: c# navigation windows-phone-8.1 drawerlayout


    【解决方案1】:

    这是一个 Windows Phone 8.1 SDK 问题。您可以通过在导航到页面时调用 Dispatcher 来解决此问题。

    CoreDispatcher dispatcher = CoreWindow.GetForCurrentThread().Dispatcher;
    await dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => {
          Frame.navigate(typeof(YourPage));
    }); 
    

    【讨论】:

    • 你好 amar,从这段代码中解决了这个问题,但是当我导航超过 3-4 次时,应用程序关闭且没有任何错误代码:stackoverflow.com/questions/32919934/…
    • 能否详细说明 SDK 问题?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-01-22
    • 1970-01-01
    相关资源
    最近更新 更多