Hide Status bar in Windows Phone 8.1 Universal App

2019-01-13 14:55发布

How to hide the Status bar in Windows Phone 8.1 (C#, XAML)?

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

3条回答
乱世女痞
2楼-- · 2019-01-13 15:04
await Windows.UI.ViewManagement.StatusBar.GetForCurrentView().HideAsync(); 
await Windows.UI.ViewManagement.StatusBar.GetForCurrentView().ShowAsync(); 

for hiding and showing the system tray

查看更多
Evening l夕情丶
3楼-- · 2019-01-13 15:19

Here a simple tutorial that explains, working with the Status bar.

http://denilparmar.blogspot.in/2016/01/working-with-statusbar-in-windows-phone.html

Hope that helps you :-)

查看更多
等我变得足够好
4楼-- · 2019-01-13 15:30

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();

Reference: Differences between the new StatusBar in Windows Phone XAML Apps and the SystemTray

Msdn Reference: StatusBar class

查看更多
登录 后发表回答