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);
            }
        }
示例#2
0
文件: BasePage.cs 项目: dw5/Viddi
 protected void SetFullScreen(ApplicationViewBoundsMode mode)
 {
     ApplicationView.GetForCurrentView().SetDesiredBoundsMode(mode);
 }
示例#3
0
        public bool SetDesiredBoundsMode(global::Windows.UI.ViewManagement.ApplicationViewBoundsMode boundsMode)
        {
            DesiredBoundsMode = boundsMode;

            return(true);
        }