如何隐藏/删除Cordova Windows 10应用程序后退按钮? [英] How to hide/remove Cordova Windows 10 app back button?

查看:256
本文介绍了如何隐藏/删除Cordova Windows 10应用程序后退按钮?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在桌面上运行该应用程序时,cordova生成的Windows 10应用程序在左上角显示了一个后退按钮.当用户点击按钮时,该应用程序的行为就像一个网络.这个选项确实很烦人.

The windows 10 app generated by cordova shows a back button on extreme top left, when I run the app in desktop. When user taps the button, the application behaves like a web. This option is really annoying.

无论如何,我可以隐藏或删除后退按钮吗?在Javascript中寻找解决方案时,C#可以是可选的.

Is there anyway that I can hide or remove the back button? Looking for solution preferably in Javascript, C# can be optional.

推荐答案

我是否可以隐藏或删除后退按钮?最好使用Javascript寻找解决方案,C#可以是可选的.

Is there anyway that I can hide or remove the back button? Looking for solution preferably in Javascript, C# can be optional.

如果要引用标题栏上的后退按钮,则可以在cordova中使用以下代码来禁用后退按钮:

If you are refering to the back button on Title bar, you can use the following codes in cordova to disable the back button:

if (cordova.platformId = "windows")
{
    var currentView = Windows.UI.Core.SystemNavigationManager.getForCurrentView();
    currentView.appViewBackButtonVisibility = Windows.UI.Core.AppViewBackButtonVisibility.collapsed;
}

这篇关于如何隐藏/删除Cordova Windows 10应用程序后退按钮?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆