private static async Task SetStatusBar() { if (IsStatusBarAvailable) { var statusBar = StatusBar.GetForCurrentView(); needRestoreStatusBar = statusBar.OccludedRect.IsEmpty; statusBarBackgroundOpacity = statusBar.BackgroundOpacity; statusBarBackgroundColor = statusBar.BackgroundColor; statusBarForegroundColor = statusBar.ForegroundColor; statusBar.BackgroundOpacity = 0; statusBar.BackgroundColor = Color.FromArgb(255, 52, 71, 87); statusBar.ForegroundColor = Colors.White; if (needRestoreStatusBar) { await statusBar.ShowAsync(); } oldBoundsMode = ApplicationView.GetForCurrentView().DesiredBoundsMode; ApplicationView.GetForCurrentView().SetDesiredBoundsMode(ApplicationViewBoundsMode.UseCoreWindow); } }
protected void SetFullScreen(ApplicationViewBoundsMode mode) { ApplicationView.GetForCurrentView().SetDesiredBoundsMode(mode); }
public bool SetDesiredBoundsMode(global::Windows.UI.ViewManagement.ApplicationViewBoundsMode boundsMode) { DesiredBoundsMode = boundsMode; return(true); }