开发者

How to hide the status bar in WP7 (Silverlight)

开发者 https://www.devze.com 2023-03-19 17:12 出处:网络
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.

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.

gr开发者_如何学JAVAaphics = 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.


using Microsoft.Phone.Shell;

private void PhoneApplicationPage_Loaded(object sender, RoutedEventArgs e)
{
    SystemTray.IsVisible = false;
}


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


Alternative:

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

private void MainPage_Loaded(object sender, RoutedEventArgs events)
{
  SystemTray.IsVisible = false;
}
0

精彩评论

暂无评论...
验证码 换一张
取 消