DZone
Mobile Zone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > Mobile Zone > Tip: Show/Hide System Tray in Windows Phone 7

Tip: Show/Hide System Tray in Windows Phone 7

Kunal Chowdhury user avatar by
Kunal Chowdhury
·
May. 08, 12 · Mobile Zone · Interview
Like (0)
Save
Tweet
4.94K Views

Join the DZone community and get the full member experience.

Join For Free

System Tray

System Tray is the small tiny bar across the top of the Phone screen. It displays in Portrait mode. When your application is set in Portrait mode, the height of the System Tray becomes 32 pixel and when the application is set in Landscape mode, the width of the System Tray becomes 72 pixel. This is as per the UI Design Guidelines and Interaction Guideline of Windows Phone 7.

It is not good way to hide the System Tray as it displays various important information to the user. But in some case, you may want to hide the System Tray.

Demonstration of Show/Hide

To start with the code, let us design our page with a CheckBox inside it. This will fire the event to show or hide the System Tray. We will add a CheckBox in the page to show or hide the System Tray. Here is the XAML code for your reference:

 
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0" VerticalAlignment="Top">
    <CheckBox Content="Show System Tray" Checked="ShowSystemTray" Unchecked="HideSystemTray"/>
</Grid>

Here is the code implementation:

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

When the “Show System Tray” is checked, you will see the System Tray bar at the top of the screen as shown in the first figure below:

Show System Tray                      Hide System Tray

Uncheck the “Show System Tray”. This will hide the System Tray bar from the screen. Hope, this tip was helpful for you to understand it clearly.

Windows Phone

Published at DZone with permission of Kunal Chowdhury, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Your Old Laptop Is Your New Database Server
  • The Most Popular Kubernetes Alternatives and Competitors
  • Is Java Still Relevant?
  • How to Submit a Post to DZone

Comments

Mobile Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo