在Windows Phone的8.1通用应用程序隐藏状态栏 [英] Hide Status bar in Windows Phone 8.1 Universal Apps
问题描述
如何隐藏状态栏的Windows Phone 8.1
(C#,XAML)?
How to hide the Status bar in Windows Phone 8.1
(C#, XAML)?
在的Windows Phone 8
这是通过设置外壳完成:SystemTray.IsVisible =FALSE
在任何网页。但其无法使用的的Windows Phone 8.1
In Windows Phone 8
it was done by setting shell:SystemTray.IsVisible="False"
at any page. But its not available in Windows Phone 8.1
推荐答案
随着Windows Phone 8.1 SDK的发布提供了一个新状态栏。状态栏取代了Windows Phone的Silverlight应用程序可以通过SystemTray。不像SystemTray中,该StausBar只能通过code访问和一些功能已经改变了。
With the release of Windows Phone 8.1 SDK comes a new StatusBar. The StatusBar replaces the SystemTray from Windows Phone Silverlight Apps. Unlike the SystemTray, the StausBar can only be accessed via code and some functionality has changed.
StatusBar statusBar = Windows.UI.ViewManagement.StatusBar.GetForCurrentView();
// Hide the status bar
await statusBar.HideAsync();
//Show the status bar
await statusBar.ShowAsync();
参考:<一href=\"http://www.visuallylocated.com/post/2014/04/07/Differences-between-the-new-StatusBar-in-Windows-Phone-XAML-Apps-and-the-SystemTray.aspx\">Differences新的状态栏在Windows Phone的XAML应用程序和SystemTray中之间
MSDN参考:<一href=\"http://msdn.microsoft.com/en-us/library/windowsphone/develop/windows.ui.viewmanagement.statusbar(v=win.10).aspx\">StatusBar类
这篇关于在Windows Phone的8.1通用应用程序隐藏状态栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!