Hide Status bar in Windows Phone 8.1 Universal Apps
Asked Answered
I

3

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

Iphlgenia answered 11/4, 2014 at 10:4 Comment(1)
You're confusing Windows Phone 8.1 and Universal Apps.Shani
D
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

Dextrous answered 11/4, 2014 at 10:12 Comment(2)
Will HideAsync clear ProgressIndicator state? I.e. Text and Value?Expectant
I think no it just hide the control. You need to clear Text and value explicitelyDextrous
J
7
await Windows.UI.ViewManagement.StatusBar.GetForCurrentView().HideAsync(); 
await Windows.UI.ViewManagement.StatusBar.GetForCurrentView().ShowAsync(); 

for hiding and showing the system tray

Jegar answered 5/11, 2014 at 0:9 Comment(0)
I
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 :-)

Indiscriminate answered 15/4, 2016 at 5:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.