Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to hide the status bar in WP7 (Silverlight)

I'm trying to hide the statur bar on the top of my Silverlight Windows Phone 7 app.
I found this while searching stackoverflow, but is for Xna.

graphics = new GraphicsDeviceManager(this); 
graphics.IsFullScreen = true;

I tried it in my app but it does not work. I know it is possible because the board express and xda apps have the feature to hide/show the statusbar.

like image 502
chr.solr Avatar asked Jul 13 '11 05:07

chr.solr


3 Answers

using Microsoft.Phone.Shell;

private void PhoneApplicationPage_Loaded(object sender, RoutedEventArgs e)
{
    SystemTray.IsVisible = false;
}
like image 77
Matt Lacey Avatar answered Nov 10 '22 00:11

Matt Lacey


I think Mahantesh's answer should be the accepted one for WP8:

shell:SystemTray.IsVisible="False"

Put that in the XAML as it the property already defined there (set to true by default).

like image 44
andreas Avatar answered Nov 10 '22 00:11

andreas


Alternative:

public MainPage()
{
  InitializeComponent();
  Loaded += MainPage_Loaded;
}

private void MainPage_Loaded(object sender, RoutedEventArgs events)
{
  SystemTray.IsVisible = false;
}
like image 2
Benny Neugebauer Avatar answered Nov 09 '22 22:11

Benny Neugebauer