windows phone 8.1 header bar icon colours

My application is setting the Requested theme in the App.xaml as we only want to show a light theme regardless of what the user's system theme is.

Problem is, when the user is on a dark theme (which has white icons for signal/battery/time etc) the app switches all style resources to use light theme but does nothing about the header bar. This creates the situation where you have a white page background and white icons on top of it.

Is there a way to change the theme applied to this top bar?

I tried adding a dark colour behind the bar (30px high rectangle with margin -30 on top) but the behaviour happens on light theme too so then if the user is on light theme, the icons are black and too dark to see on the colour background.

It's not obvious in the picture, but on top of that map there is the header bar with icons but the icons are white and the theme says page background is white.

例


Turns out the correct answer is: http://msdn.microsoft.com/library/windows/apps/windows.ui.viewmanagement.statusbar(v=win.10).aspx

This class also cannot be used from the XAML so you have to do:

public MainPage()
    {
        StatusBar statusBar = StatusBar.GetForCurrentView();
        statusBar.ForegroundColor = new Windows.UI.Color() { A = 0xFF, R = 0xFF, G = 0x00, B = 0xAA };
        this.InitializeComponent();
    }
链接地址: http://www.djcxy.com/p/68018.html

上一篇: 什么是Continuum Transition ExitElement?我该如何使用它?

下一篇: Windows Phone 8.1标题栏图标颜色