6

I want to customize the color of the status bar that is shown during the splash screen.

What used to work on Windows Phone 8.1 seems to be broken on Windows 10.
I use a splash screen PNG and set the Splash Screen Background color in my package manifest to the same color that the PNG.

Here is the result with a Windows Phone 8.1 app running on a WP8.1 device:

And the same app running on Windows 10:

It's the same with Windows 10 apps, the status bar is always black.
Is there a way to have a colored status bar on Windows 10 Mobile?

Nasreddine
  • 36,610
  • 17
  • 75
  • 94
Olivier Payen
  • 15,198
  • 7
  • 41
  • 70
  • @JustinXL that answer doesn't apply for splash screens, right? – Olivier Payen Sep 02 '15 at 12:24
  • Actually, I just compiled a project with .NET Native and ran it on a reasonably high end phone and saw the same black taskbar above. Good find! This is going to be annoying... – Justin XL Sep 02 '15 at 12:59
  • Recommendation is to not use Splash screens any more. If you need some branding, use a page and throw in some animation to make it snazy – Shawn Kendrot Sep 02 '15 at 21:14
  • @ShawnKendrot Where does that recommendation come from? Here is what is indicated on MSDN: "Every Universal Windows Platform (UWP) app must have a splash screen, which consists of a splash screen image and a background color." (https://msdn.microsoft.com/en-us/library/windows/apps/hh465338.aspx) – Olivier Payen Sep 02 '15 at 21:46
  • I thought it was stated at build, but maybe not – Shawn Kendrot Sep 02 '15 at 22:11

2 Answers2

1

It seems like this was a bug in the preview builds of Windows 10 mobile. It's now fixed (build 10.0.10586.11).

Olivier Payen
  • 15,198
  • 7
  • 41
  • 70
-3

Actually you can do this so easy! First of all, verify is this API is present.

Look this:

if (Windows.Foundation.Metadata.ApiInformation.IsTypePresent("Windows.UI.ViewManagement.StatusBar"))
            {
                var statusBar = Windows.UI.ViewManagement.StatusBar.GetForCurrentView();
                statusBar.BackgroundColor = Windows.UI.Colors.Transparent;
                statusBar.ForegroundColor = Windows.UI.Colors.Red;
            }
  • 1
    So when would you call this to modify the status bar of a view that's not even initialized? – Stefan Over Sep 03 '15 at 05:58
  • Yes, the question is not about the status bar when the app is running, but when the app is launching (during the splash screen). – Olivier Payen Sep 03 '15 at 07:18
  • Sorry, but this doesn't work, at least in this case. All methods for modifying the style of the StatusBar are executed after the splash screen is dismissed. – r2d2rigo Sep 03 '15 at 20:07