48

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

Claus Jørgensen
  • 25,882
  • 9
  • 87
  • 150
Kalyan
  • 1,395
  • 2
  • 13
  • 26

3 Answers3

89

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

Rico Suter
  • 11,548
  • 6
  • 67
  • 93
Muhammad Umar
  • 3,761
  • 1
  • 24
  • 36
7
await Windows.UI.ViewManagement.StatusBar.GetForCurrentView().HideAsync(); 
await Windows.UI.ViewManagement.StatusBar.GetForCurrentView().ShowAsync(); 

for hiding and showing the system tray

Balázs Édes
  • 13,452
  • 6
  • 54
  • 89
apramc
  • 1,346
  • 1
  • 15
  • 30
0

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 :-)

Denil Parmar
  • 154
  • 12