隐藏状态栏后,C#WP10页面未调整大小

隐藏状态栏后,C#WP10页面未调整大小,c#,xaml,windows-phone-8.1,windows-10-mobile,C#,Xaml,Windows Phone 8.1,Windows 10 Mobile,我目前正在为windows phone制作一个应用程序,在我试图隐藏状态栏的应用程序中,它工作正常,在windows phone 8.1上应该如此,但在windows phone 10上,我得到了一些奇怪的结果 这是我使用的XAML <Canvas x:Name="canvas" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Backgrou

我目前正在为windows phone制作一个应用程序,在我试图隐藏状态栏的应用程序中,它工作正常,在windows phone 8.1上应该如此,但在windows phone 10上,我得到了一些奇怪的结果

这是我使用的XAML

    <Canvas x:Name="canvas"          
        VerticalAlignment="Stretch" 
        HorizontalAlignment="Stretch" 
        Background="Black"
        Height="Auto">
无所事事

     var statusBar = StatusBar.GetForCurrentView();
     canvas.height = (cavas.height + statusBar.OccludedRect.Height); 
     await statusBar.HideAsync();

是否什么都不做

是否尝试设置所需的边界模式

     var statusBar = StatusBar.GetForCurrentView();
     canvas.height = (cavas.height + statusBar.OccludedRect.Height); 
     await statusBar.HideAsync();
ApplicationView.SetDesiredBoundsMode(ApplicationViewBoundsMode.UseCoreWindows);

抱歉花了这么长时间回复,没有任何效果,所以我放弃了,我决定使用状态栏,在app.xaml.cs中更改请求的主题,然后在mainpage.cs中更改前景色