System Tray is an important part of Windows Phone 7 platform as it displays critical system information and notifications to the user. In this post I will cover basic functionality of system tray, explain how to hide/show system tray in your Windows Phone 7 applications programmatically and demonstrate some status icons.
- System Tray is located in the top part of a PhoneApplicationFrame (basically Frame consist of Page element and System Tray)
- System Tray is mostly used to display status Icons or system-level notification to user(some of the status icons are shown in the last section of this post)
- In portrait orientation system tray has a height of 32px
- In landscape orientation system tray has a width of 72px
- System Tray is also available in Windows Phone 7 Emulator(image bellow)
- To display System Tray in emulator or on an actual device you have to tap the top of the screen
- System Tray usually disappears after a few seconds
- System Tray is not available in full screen mode
- SystemTray is a class of Microsoft.Phone.Shell namespace
Show/Hide System Tray in applications
To display system tray in XAML page of your application you have to add the following line of code to <phone:PhoneApplicationPage> element (note that by default this attribute is set to True):
To hide system tray in your XAML page you have to set this attribute to False (it will add some additional room for the content of your application page):
Here are some of Windows Phone 7 system tray status icons taken from my HTC Mozart manual.