Skip to main content
 首页 » 编程设计

windows-phone-8.1中是否可以强制 Windows Phone 8.1 应用程序全屏运行,隐藏通知栏(又名系统托盘)

2025年01月19日77dudu

我不确定这里的术语是否正确,但我有兴趣隐藏屏幕顶部的栏。

我看到 Windows Phone 8 的示例概述了以下内容:

xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone" 
Shell:SystemTray.IsVisiable="False" (Or true to display the tray) 
Shell:SystemTray.BackgroundColor="Transparent" 

但这在 8.1 中不起作用。

如何在 Windows Phone 8.1 中实现此目的?

请您参考如下方法:

我想你可以尝试隐藏StatusBar在 App.xaml.cs 中 - 例如激活窗口后:

Window.Current.Activate(); 
StatusBar status = StatusBar.GetForCurrentView(); 
status.HideAsync(); 

不知何故,您还会发现类似的问题 here有很好的引用。