如何删除UWP Cordova(Ionic)标题栏箭头,也许是app标题? [英] How to remove UWP Cordova (Ionic) title bar arrow, and perhaps app title?
问题描述
我在Windows 10(UWP)上运行了Cordova(Ionic 2)应用程序,我使用Visual Studio 2017来构建Cordova项目。
I have a Cordova (Ionic 2) application running on Windows 10 (UWP), I am using Visual Studio 2017 to build the Cordova project.
托管窗口作为箭头,看起来完全不合适,特别是当我在儿童视图中并且离子状态栏已经有后箭头时。
The hosting window as an arrow, which looks completely out of place, especially if when I am in child views and the Ionic status bar already has a back arrow.
这里是我的箭头谈论
有谁知道如何删除或者隐藏这个?
Does anyone know how to remove or hide this?
也许应用程序标题(虽然这不是一个大问题)
Also maybe the application title (though this is not as big a issue)
谢谢提前!
根据@Sunteen Wu - MSFT的建议,以下解决了我的问题......
As suggested by @Sunteen Wu - MSFT, the following solved my problem...
private hideWindowsTitleBackArrow() : void {
try {
let w : any = window;
if (w.cordova.platformId == "windows") {
let currentView = w.Windows.UI.Core.SystemNavigationManager.getForCurrentView();
currentView.appViewBackButtonVisibility = w.Windows.UI.Core.AppViewBackButtonVisibility.collapsed;
}
} catch (error) {
this.logger.error(`Error in hideWindowsTitleBackArrow: ${error}`);
}
}
推荐答案
你可以尝试在cordova中使用以下代码来禁用后退按钮:
You can try to 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;
}
更多详情请参阅 SystemNavigationManager
class。
More details please reference SystemNavigationManager
class.
这篇关于如何删除UWP Cordova(Ionic)标题栏箭头,也许是app标题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!