locked
Background Color RRS feed

  • Question

  • Hi, how do I force the whole phone background color to be black, so that when the theme changes to light it does not change the background for my application? I tried setting the grids' backgrounds to black but there will still be a white strip at the top. Any ideas would be greatly appreciated. Thanks! Emma
    Tuesday, February 15, 2011 8:09 PM

Answers

  • The strip you see is the System Tray. It always has the background color of the theme.

    You cannot control that color from your app code, but you can turn it off for your page by setting this property in XAML:

     

    shell:SystemTray.IsVisible="False" 

    Thanks,
    Stefan Wick

    Microsoft Silverlight

     

     

     

     

     

     

     

     

     

     

     

     

    Tuesday, February 15, 2011 8:22 PM

All replies

  • The strip you see is the System Tray. It always has the background color of the theme.

    You cannot control that color from your app code, but you can turn it off for your page by setting this property in XAML:

     

    shell:SystemTray.IsVisible="False" 

    Thanks,
    Stefan Wick

    Microsoft Silverlight

     

     

     

     

     

     

     

     

     

     

     

     

    Tuesday, February 15, 2011 8:22 PM
  • Is there a compelling reason why your background always needs to be black? I find it extremely annoying when an app developer decides that the untarnished beauty of their app is more important than my ability to see what time it is or what my signal strength happens to be. You should only hide the system tray as an absolute last resort. 99% of the time the better option is to support the light theme correctly.
    Tuesday, February 15, 2011 9:18 PM
  • Chefgon, Thanks for your input. I decided not to force the background color, and I left the system tray in place as well for similar reasons to those you outlined above. I found a way to make my app look nice and have everything look nice on the phone too.
    Thursday, February 17, 2011 5:59 PM
  • simple goto the xaml page and right beside the

    shell:SystemTray.IsVisible="True"

    entry add

    shell:SystemTray.BackgroundColor="White" shell:SystemTray.ForegroundColor="Black"

    or (in your case use black instead of white and white instead of black)

    Friday, August 26, 2011 12:06 AM