我正在努力从 Cordova 应用程序移植到通用 Windows 平台。此时,我基本上创建了一个容器,其中显示本地 html 文件(它们也是从 Cordova 应用程序移植的)。现在,我想在窗口的左上角添加一个后退按钮,就像任何 UWP 应用程序一样。为此,我使用以下说明:
SystemNavigationManager.GetForCurrentView().AppViewBackButtonVisibility = AppViewBackButtonVisibility.Visible;
它工作得很好,但我希望只有当某个 html 文件显示到 webview 时才会出现这个按钮。应该是这样的逻辑:
1) If certain_file.html is loaded
1.1) Show the back button
2) Else
2.1) Hide the back button
我正在使用 Visual Studio 和 Visual C#。你知道我该怎么做吗?
万千封印
相关分类