How to hide/remove Cordova Windows 10 app back button?

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-17 08:23:08

问题


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.

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


回答1:


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

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;
}


来源:https://stackoverflow.com/questions/45054317/how-to-hide-remove-cordova-windows-10-app-back-button

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!