Universal Windows Platform styling status bar

Dealing with the Status Bar is pretty simple. Still you need to pay attention since the status bar is inheriting the color scheme based on your requested theme.
So, you’ll need to make sure that there’s not a mismatch between your page background and your theme.

Sow how do you do this in UWP for 8.1 ?
var statusbar = StatusBar.GetForCurrentView(); statusbar.ForegroundColor = Colors.Red;

In windows 10 you could to the same but you do need to require an extra reference to the Windows Mobile Extension for UWP and also check if the status bar is present.

1) In Solution Explorer, under your Solution, Right-click References and click Add Reference.
2) Under Windows Universal > Extensions, add Mobile Extension SDK.

And this is the code how you can check if it's available:

if (Windows.Foundation.Metadata.ApiInformation.IsTypePresent(nameof(StatusBar))) { // statusbar changes }