Home > .Net, C#, Silverlight, Windows Phone 7, XNA > How to use the full screen in Windows Phone 7 application

How to use the full screen in Windows Phone 7 application

While looking on Window’s Phone 7 device (or emulator), one can see in the upper part of screen the area, named “Status Bar”. See the next image:



When you want to see the status bar, you should tap appropriate are on the display. The icons on the status bar contain an information about your phone: signal strength, network connectivity, battery power, time, etc. Here one can find short description of every icon:



For full description one should visit Microsoft Windows Phone 7 site.

In several applications, we would like to use the whole screen’s area and get real 800 × 480 resolution. (status bar is 32 × 480). Is it possible?

Yes. Moreover, it is very simple.

In Silverlight application set in XAML

<phone:PhoneApplicationPage
  ...
  shell:SystemTray.IsVisible="False"
  ...
>

And if you need to do it in code behind, register to “Loaded” event:

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

In XNA application:

public class Game1 : Microsoft.Xna.Framework.Game 
{ 
        GraphicsDeviceManager graphics;
        .
        .
        .
        public Game1() 
        { 
                graphics = new GraphicsDeviceManager(this);
                graphics.IsFullScreen = true;
                .
                .
                .
        }
        .
        .
        .
}

Now you can use the whole phone’s screen for your best application! 🙂
Note, that Silverlight application’s default orientation is portrait, whereas default XNA application’s orientation is landscape.

  1. Aleksandar
    February 29th, 2012 at 10:17 | #1

    Thanks.

  1. No trackbacks yet.