<tfoot id='xV48V'></tfoot>

    <small id='xV48V'></small><noframes id='xV48V'>

  1. <i id='xV48V'><tr id='xV48V'><dt id='xV48V'><q id='xV48V'><span id='xV48V'><b id='xV48V'><form id='xV48V'><ins id='xV48V'></ins><ul id='xV48V'></ul><sub id='xV48V'></sub></form><legend id='xV48V'></legend><bdo id='xV48V'><pre id='xV48V'><center id='xV48V'></center></pre></bdo></b><th id='xV48V'></th></span></q></dt></tr></i><div id='xV48V'><tfoot id='xV48V'></tfoot><dl id='xV48V'><fieldset id='xV48V'></fieldset></dl></div>

      <bdo id='xV48V'></bdo><ul id='xV48V'></ul>
    1. <legend id='xV48V'><style id='xV48V'><dir id='xV48V'><q id='xV48V'></q></dir></style></legend>

      Windows 10 UAP 后退按钮

      时间:2023-09-15

        <legend id='xf8BC'><style id='xf8BC'><dir id='xf8BC'><q id='xf8BC'></q></dir></style></legend>
          <tbody id='xf8BC'></tbody>

            <bdo id='xf8BC'></bdo><ul id='xf8BC'></ul>
            <i id='xf8BC'><tr id='xf8BC'><dt id='xf8BC'><q id='xf8BC'><span id='xf8BC'><b id='xf8BC'><form id='xf8BC'><ins id='xf8BC'></ins><ul id='xf8BC'></ul><sub id='xf8BC'></sub></form><legend id='xf8BC'></legend><bdo id='xf8BC'><pre id='xf8BC'><center id='xf8BC'></center></pre></bdo></b><th id='xf8BC'></th></span></q></dt></tr></i><div id='xf8BC'><tfoot id='xf8BC'></tfoot><dl id='xf8BC'><fieldset id='xf8BC'></fieldset></dl></div>
            • <tfoot id='xf8BC'></tfoot>
              1. <small id='xf8BC'></small><noframes id='xf8BC'>

                本文介绍了Windows 10 UAP 后退按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                如何处理 windows mobile 10 的后退按钮和 windows 10 平板模式的后退按钮?我一直在到处寻找,但找不到任何例子.

                How would I handle the back button for windows mobile 10 and the back button for windows 10 tablet mode? I've been looking everywhere but can't find any examples for it.

                推荐答案

                本主题是 通用 Windows 平台应用指南.我强烈建议在开始使用通用应用程序时阅读.

                This topic is one of the examples used in the Guide to Universal Windows Platform apps . I strongly suggest reading that when getting started with Universal apps.

                对于页眉上的按钮,使用 Windows.UI.Core.SystemNavigationManager 并设置 AppViewBackButtonVisibility 属性以显示或隐藏按钮并处理 BackRequested 事件以执行导航.

                For the button on the page header use Windows.UI.Core.SystemNavigationManager and set the AppViewBackButtonVisibility property to show or hide the button and handle the BackRequested event to perform the navigation.

                Windows.UI.Core.SystemNavigationManager.GetForCurrentView().AppViewBackButtonVisibility = AppViewBackButtonVisibility.Visible;
                Windows.UI.Core.SystemNavigationManager.GetForCurrentView().BackRequested += (s,a) =>
                {
                    Debug.WriteLine("BackRequested");
                    if (Frame.CanGoBack)
                    {
                        Frame.GoBack();
                        a.Handled = true;
                    }
                }
                

                您连接硬件返回按钮的方式与在 Windows Phone 8.1 中相同,但您应该检查 PhoneContract(或单个类和方法)以确保它存在:

                You wire up the hardware back button the same as you do in Windows Phone 8.1, but you should check for the PhoneContract (or the individual class and method) to make sure it is there:

                if (ApiInformation.IsApiContractPresent ("Windows.Phone.PhoneContract", 1, 0)) {  
                    Windows.Phone.UI.Input.HardwareButtons.BackPressed += (s, a) =>
                    {
                        Debug.WriteLine("BackPressed");
                        if (Frame.CanGoBack)
                        {
                            Frame.GoBack();
                            a.Handled = true;
                        }
                    };
                }
                

                这篇关于Windows 10 UAP 后退按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:如何检测我的应用程序是否在 Windows 10 上运行 下一篇:如何将 Windows Phone 10 应用程序部署到设备上?

                相关文章

                  <legend id='v3X7L'><style id='v3X7L'><dir id='v3X7L'><q id='v3X7L'></q></dir></style></legend><tfoot id='v3X7L'></tfoot>

                    <bdo id='v3X7L'></bdo><ul id='v3X7L'></ul>
                1. <i id='v3X7L'><tr id='v3X7L'><dt id='v3X7L'><q id='v3X7L'><span id='v3X7L'><b id='v3X7L'><form id='v3X7L'><ins id='v3X7L'></ins><ul id='v3X7L'></ul><sub id='v3X7L'></sub></form><legend id='v3X7L'></legend><bdo id='v3X7L'><pre id='v3X7L'><center id='v3X7L'></center></pre></bdo></b><th id='v3X7L'></th></span></q></dt></tr></i><div id='v3X7L'><tfoot id='v3X7L'></tfoot><dl id='v3X7L'><fieldset id='v3X7L'></fieldset></dl></div>

                    <small id='v3X7L'></small><noframes id='v3X7L'>