Windows Phone 中的 DrawerLayout
DrawerLayout in Windows Phone
我在库 DrawerLayout 的帮助下在 Windows Phone 应用程序中创建了 DrawerLayot。
在模拟器中一切正常。但是当我 运行 我的 phone 上的应用程序时,他起飞了。我注意到,这发生在调用 Frame.Navigate() 之后。有什么问题?
这是一个 Windows Phone 8.1 SDK 问题。您可以通过在导航到页面时调用 Dispatcher 来解决此问题。
CoreDispatcher dispatcher = CoreWindow.GetForCurrentThread().Dispatcher;
await dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => {
Frame.navigate(typeof(YourPage));
});
我在库 DrawerLayout 的帮助下在 Windows Phone 应用程序中创建了 DrawerLayot。 在模拟器中一切正常。但是当我 运行 我的 phone 上的应用程序时,他起飞了。我注意到,这发生在调用 Frame.Navigate() 之后。有什么问题?
这是一个 Windows Phone 8.1 SDK 问题。您可以通过在导航到页面时调用 Dispatcher 来解决此问题。
CoreDispatcher dispatcher = CoreWindow.GetForCurrentThread().Dispatcher;
await dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => {
Frame.navigate(typeof(YourPage));
});