protected virtual void SetUpStatusBar() { if (ApiInformationHelper.HasStatusBar()) { StatusBarHelper.SetUpBlueStatusBar(); } }
protected override void UnRegisterHandleBackLogic() { SystemNavigationManager.GetForCurrentView().BackRequested -= NewMainPage_BackRequested; if (ApiInformationHelper.HasHardwareButton()) { HardwareButtons.BackPressed -= HardwareButtons_BackPressed; } }
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(); } } }
protected virtual void UnRegisterHandleBackLogic() { try { SystemNavigationManager.GetForCurrentView().BackRequested -= BindablePage_BackRequested; if (ApiInformationHelper.HasHardwareButton()) { HardwareButtons.BackPressed -= HardwareButtons_BackPressed; } } catch (Exception e) { Debug.WriteLine(e.Message); } }
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); }); }