Customizing SystemTray’s Background in Mango

A missing feature from Windows phone 7.0 was the ability to set the Background and Foreground color in the SystemTray.
For branded apps (like Facebook) this was a problem cause the tray looked ugly, so most of these apps had to hide it, hiding important notifications (like clock, battery indicator ) from the user..

In Mango, you can finally set Foreground (of type System.Windows.Media.Color ), and Background (type Color too) on SystemTray
I hope that going forward, all apps start setting IsVisible=”true” on the system tray. There is no excuse now for hiding it any more.

I just looked at the API and found two other nice surprises:

  1. SystemTray has an Opacity property.   The reason this is nice is because PhoneApplicationFrame applies the same logic to SystemTray than it does to ApplicationBar:
    If your SystemTray is not 100% opaque (that means if Opacity < 1.0) , the space for the tray is not reserved in layout, so you can get a few pixels back… Your page gets full height and it is up to you to reserve space for the tray).
    If your SystemTray is opaque (Opacity = 1.0) and visible,  then frame reserves the space, and your page loses 32 pixels at the top when in portrait and
  2. SystemTray is a DependencyObject and since we are now running on SL4, DependencyObject can be data bound;  hooray for SL4 on phone.

Of course, there is one more nicety in SystemTray (ProgressIndicator).  I will share my code on that in the next post (hopefully tomorrow)..

Happy Windows Phone “Mango” coding!!