Search code examples
wpfwindows-phone-8win-universal-appwindows-10

Windows 10 UWP - White space on Windows Phone Emulator


I'am developing a Windows 10 Universal App and every time I debug it on the Windows Phone emulator, I get the following "white space" on the top of my view (yellow in the picture).

Does somebody know this issue? What can I do?

When I debug it on my local machine (as a windows store app) there is no white space on top. Maybe it is the navigation bar or something like that??? It seems like there is a top margin set to all of my views ...

White space on the top of the view - example


Solution

  • It's the Status Bar, which only shows up on mobile. In UWP, the background color of the Status Bar seems to inherit from the background of the main page. So, if the background color of your Page is set to White, but your RequestedTheme is set to Dark, you'd see something like this. Try changing the background color of your main page, or the RequestedTheme property.

    It's also possible to hide the Status Bar in a UWP app.

    I wrote up a quick blog post about this: https://stenobot.wordpress.com/2015/07/08/uwp-app-development-styling-the-mobile-status-bar/