Search code examples
c#uwpwindows-10-mobileuwp-xaml

Layout - Windows 10 mobile - unnecessary stripe


I have one problem with layout when I running my Windows Universal App on Nokia Lumia 635. It is unnecessary stripe which showed up recently. I really don't know if I changed something, but before it was alright. In emulator stripe is black. On my device is white.

1

2


Solution

  • It is unnecessary stripe which showed up recently.

    It seems like the stripe is for status bar. Hide the status bar like follows may resolve your issue.

    public RemoveGap()
    {
       this.InitializeComponent(); 
       if (ApiInformation.IsTypePresent("Windows.UI.ViewManagement.StatusBar"))
       {
           StatusBar.GetForCurrentView().HideAsync();  
       }
    }
    

    Pay attention, to use this class, we need to add a mobile special reference as following picture shows:enter image description here

    I really don't know if I changed something, but before it was alright.

    I guess you just change the target platform, e.g. you tested it on a pc device before or some other device which doesn't have status bar.