Esempio n. 1
0
 protected virtual void SetUpStatusBar()
 {
     if (ApiInformationHelper.HasStatusBar())
     {
         StatusBarHelper.SetUpBlueStatusBar();
     }
 }
Esempio n. 2
0
 protected override void UnRegisterHandleBackLogic()
 {
     SystemNavigationManager.GetForCurrentView().BackRequested -= NewMainPage_BackRequested;
     if (ApiInformationHelper.HasHardwareButton())
     {
         HardwareButtons.BackPressed -= HardwareButtons_BackPressed;
     }
 }
Esempio n. 3
0
 private async Task InitializeStatusBar()
 {
     if (ApiInformationHelper.Check(ApiContract.Phone, 1, 0))
     {
         var statusBar = StatusBar.GetForCurrentView();
         if (statusBar != null)
         {
             statusBar.ForegroundColor   = (Color)Resources["SystemChromeAltLowColor"];
             statusBar.BackgroundColor   = (Color)Resources["SystemChromeLowColor"];
             statusBar.BackgroundOpacity = 1;
             await statusBar.ShowAsync();
         }
     }
 }
Esempio n. 4
0
 protected virtual void UnRegisterHandleBackLogic()
 {
     try
     {
         SystemNavigationManager.GetForCurrentView().BackRequested -= BindablePage_BackRequested;
         if (ApiInformationHelper.HasHardwareButton())
         {
             HardwareButtons.BackPressed -= HardwareButtons_BackPressed;
         }
     }
     catch (Exception e)
     {
         Debug.WriteLine(e.Message);
     }
 }
Esempio n. 5
0
        public LoginPage()
        {
            this.InitializeComponent();
            this.KeyDown += LoginPage_KeyDown;

            LoginVM          = new LoginViewModel();
            this.DataContext = LoginVM;

            if (ApiInformationHelper.HasStatusBar())
            {
                StatusBar.GetForCurrentView().BackgroundColor   = (App.Current.Resources["MyerListBlueLight"] as SolidColorBrush).Color;
                StatusBar.GetForCurrentView().BackgroundOpacity = 0.01;
                StatusBar.GetForCurrentView().ForegroundColor   = Colors.White;
            }

            Messenger.Default.Register <GenericMessage <string> >(this, "toast", act =>
            {
                var msg = act.Content;
                ToastControl.ShowMessage(msg);
            });
        }