Hide Status bar in Windows Phone 8.1 Universal Apps

Kalyan picture Kalyan · Apr 11, 2014 · Viewed 22.7k times · Source

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

Answer

Muhammad Umar picture Muhammad Umar · Apr 11, 2014

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