示例#1
0
 async private void HideSts()
 {
     if (Windows.Foundation.Metadata.ApiInformation.IsTypePresent("Windows.Phone.UI.Input.HardwareButtons"))
     {
         Windows.UI.ViewManagement.StatusBar statusBar = Windows.UI.ViewManagement.StatusBar.GetForCurrentView();
         await statusBar.HideAsync();
     }
 }
 private async void HideStatusBar()
 {
     if (Windows.Foundation.Metadata.ApiInformation.IsTypePresent("Windows.UI.ViewManagement.StatusBar"))
     {
         Windows.UI.ViewManagement.StatusBar statusBar = Windows.UI.ViewManagement.StatusBar.GetForCurrentView();
         await statusBar.HideAsync();
     }
 }
示例#3
0
        /// <summary>
        /// Hides the status bar.
        /// </summary>
        /// <returns></returns>
        public Task HideAsync()
        {
#if WINDOWS_UWP || WINDOWS_PHONE_APP
            if (_statusBar != null)
            {
                return(_statusBar.HideAsync().AsTask());
            }
#elif WINDOWS_PHONE
            return(Task.Run(() => { Microsoft.Phone.Shell.SystemTray.IsVisible = false; }));
#endif
            return(Task.Run(() => { }));
        }
示例#4
0
        public Shell(Frame frame)
        {
            this.InitializeComponent();
            this.ShellSplitView.Content = frame;
            frame.Navigated            += Frame_Navigated;
            this.DataContext            = this;
            ViewModel = new ShellViewModel();

            if (Windows.Foundation.Metadata.ApiInformation.IsTypePresent("Windows.Phone.UI.Input.HardwareButtons"))
            {
                Windows.Phone.UI.Input.HardwareButtons.BackPressed += HardwareButtons_BackPressed;
            }
            else
            {
                backButton.Click += BackButton_Click;
            }

            if (Windows.Foundation.Metadata.ApiInformation.IsTypePresent("Windows.UI.ViewManagement.StatusBar"))
            {
                Windows.UI.ViewManagement.StatusBar statusBar = Windows.UI.ViewManagement.StatusBar.GetForCurrentView();
                statusBar.HideAsync();
            }
        }
示例#5
0
 private async void HideStatusBar()
 {
     Windows.UI.ViewManagement.StatusBar bar = Windows.UI.ViewManagement.StatusBar.GetForCurrentView();
     await bar.HideAsync();
 }
 /// <summary>
 /// Invoked when this page is about to be displayed in a Frame.
 /// </summary>
 /// <param name="e">Event data that describes how this page was reached.
 /// This parameter is typically used to configure the page.</param>
 async protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     // Hide Status bar
     Windows.UI.ViewManagement.StatusBar statusBar = Windows.UI.ViewManagement.StatusBar.GetForCurrentView();
     await statusBar.HideAsync();
 }