如何仅显示一次时间页Windows Phone 8.1运行时

用户名

我希望仅在应用程序启动后显示页面,下一次进入主屏幕。我正在尝试浏览NavigationHelper,但不起作用!

凯文·高斯(Kevin Gosse)

签入您的App.xaml.cs文件,方法中应该包含类似于以下代码的内容OnLaunched

if (rootFrame.Content == null)
{
    // When the navigation stack isn't restored navigate to the first page,
    // configuring the new page by passing required information as a navigation
    // parameter
    if (!rootFrame.Navigate(typeof(MainPage), args.Arguments))
    {
        throw new Exception("Failed to create initial page");
    }
}

在这里,您可以检查是否是首次启动该应用程序(例如,通过在手机上存储一个值),并使用rootFrame.Navigate(typeof(MainPage), args.Arguments))您要导航到的页面来代替对的呼叫

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

Windows Phone 8-本机和CLR运行时

Windows Phone 8-非页内广告仅显示一次

当应用程序在锁屏Windows Phone 8下运行时,ClipBoard.SetText引发异常

Windows Phone运行时pathicon运行时与设计时

在Windows Phone 8.1上运行Windows Phone 8应用

Windows Phone 8.1(运行时):如何在FlipView中显示图像列表?

Windows Phone 8-计划的代理LaunchForTest仅滴答一次

Windows 8报告错误的正常运行时间(可能是混合启动的总正常运行时间)

编写仅在Windows Phone应用程序首次运行时运行的代码

如何在Windows Phone 8.1运行时上的ListView中模拟LongListMultiSelector的选择行为

我无法在运行时权限中显示Manifest.permission.CALL_PHONE

在模拟器中配置的SD卡路径为空-Windows Phone 8.1(运行时)

在Window Phone 8.1(Windows运行时)应用中获取phoneaccentcolor吗?

Windows Phone Thread.Sleep防止在后台运行时加载UI

在Windows Phone 8.1运行时获取音乐文件太慢

当应用程序在Windows Phone 8.1运行时应用程序上运行时,如何使用Toast Notification?

Windows Phone 8记录

Windows Phone 8的LockScreen

触发时,应用程序正常运行时间仅运行一次

重新启动或关闭后,Windows 8正常运行时间未重置

Qt 5.1应用程序在QtCreator以外的Windows 8上无法运行,运行时错误

如何确定Windows Phone 8(.1)上的蓝牙是否打开

保持StreamSocketListener在Windows Phone 8上在后台运行

在Windows Phone 8上从App.xaml.cs运行任务

如何在Windows Phone 8.1运行时应用程序(不是Silverlight)中打开Appmanifest.xml文件?

如何注册我的应用程序,使其出现在Windows Phone 8.1运行时的phote编辑列表中

如何在Windows Phone 8.1运行时应用程序的xaml页面本身中添加多个AppBar / CommandBar?

Windows Phone 8应用程序可以在Windows Phone 8.1上运行吗

Windows Phone 8页面方向