Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hide Status bar in Windows Phone 8.1 Universal Apps

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

like image 747
Kalyan Avatar asked Apr 11 '14 10:04

Kalyan


People also ask

What hide status bar means?

This lesson describes how to hide the status bar on different versions of Android. Hiding the status bar (and optionally, the navigation bar) lets the content use more of the display space, thereby providing a more immersive user experience.

How do I hide the taskbar on Android?

Way 1: Touch “Settings” -> “Display” -> “Navigation bar” -> “Buttons” -> “Button layout”. Choose the pattern in “Hide navigation bar” -> When the app opens, the navigation bar will be automatically hidden and you can swipe up from the bottom corner of the screen to show it.


2 Answers

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

like image 126
Muhammad Umar Avatar answered Oct 12 '22 13:10

Muhammad Umar


await Windows.UI.ViewManagement.StatusBar.GetForCurrentView().HideAsync(); 
await Windows.UI.ViewManagement.StatusBar.GetForCurrentView().ShowAsync(); 

for hiding and showing the system tray

like image 39
apramc Avatar answered Oct 12 '22 14:10

apramc