Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hiding Status Bar / White Bar At Top of Windows 10 Universal App on Phone

How do I get rid of the white bar at the top of a Windows 10 for phone app?

Nick.

like image 413
Nick Avatar asked Mar 16 '23 01:03

Nick


1 Answers

Quick answer: Don't do anything. This will be fixed in a future build.

Long answer: when you do File>New to create a new VB/C# UWP app, by default its App.xaml sets RequestedTheme="Light". This causes the background of the statusbar to be white. It should also cause the foreground of the statusbar to be black, but this isn't happening at the moment in Win10.Mobile build 10080... instead it's picking up the foreground color from the user's own "light-theme vs dark-theme" preferences.

As a workaround for now, you could set RequestedTheme="Default". (You can't set RequestedTheme="Dark" since that will have the opposite problem for folks who picked a light theme for their phones!)

Another workaround for now is to control the statusbar colors explicitly yourself:

StatusBar.BackgroundColor = Colors.White
StatusBar.ForegroundColor = Colors.Black
StatusBar.BackgroundOpacity = 1
like image 51
Lucian Wischik Avatar answered Apr 28 '23 23:04

Lucian Wischik