locked
StatusBar ForegroundColor

    Question

  • Hi,

    I'm building an app that can work either in Dark or Light theme, but when I open a picker developed by me, I want it to be displayed in Light theme, so I set the RequestedTheme=Light in the picker content, so far so good, the problem is the StatusBar foreground color is not updated. Then I tried to change the ForegroundColor of StatusBar manually to Colors.Black, It worked, but when I close the picker I set ForegroundColor=null, expecting it would get back to the original color. Unfortunately this doesn't work. Do you see any alternative?

    Thanks,

    Alvaro.


    Alvaro Rivoir

    Saturday, September 27, 2014 5:52 PM

All replies

  • Hi Alvaro,

    You have to add opacity also. Here is code

    StatusBar statusBar = StatusBar.GetForCurrentView();
    statusBar.BackgroundOpacity = 1;

    • Proposed as answer by Ashiq Hassan Sunday, September 28, 2014 8:51 AM
    • Unproposed as answer by Ashiq Hassan Sunday, September 28, 2014 8:51 AM
    • Proposed as answer by Ashiq Hassan Sunday, September 28, 2014 8:51 AM
    • Unproposed as answer by Alvaro Rivoir Monday, September 29, 2014 7:56 PM
    Saturday, September 27, 2014 6:44 PM
  • Why does setting the opacity of the background would change the foreground? I guess you didn't understand the question, do you?

    Alvaro Rivoir

    Monday, September 29, 2014 7:56 PM
  • Any update? Thanks

    Alvaro Rivoir

    Wednesday, October 1, 2014 4:38 PM
  • you can use

    ApplicationView.GetForCurrentView().SetDesiredBoundsMode(ApplicationViewBoundsMode.UseCoreWindow);
    

    then  your application gets visible behind the statusbar but you need to add the margin yourslef


    Microsoft Certified Solutions Developer - Windows Store Apps Using C#

    Wednesday, October 1, 2014 8:39 PM
  • Pickers already use the core window space, why would I set that? and where? I tried to set it to UseVisible, inside CreatePresenter method, to see if the content of the picker don't take up the status bar space but it didn't work. Picker seems to ignore this completely. 

    Alvaro Rivoir

    Thursday, October 2, 2014 5:06 PM