Esempio n. 1
0
        public MainPage()
        {
            InitializeComponent();

            SystemNavigationManager.GetForCurrentView().BackRequested += SystemNavigationManager_BackRequested;

            if (ApiInformation.IsTypePresent("Windows.Phone.UI.Input.HardwareButtons"))
            {
                Windows.Phone.UI.Input.HardwareButtons.BackPressed += (s, e) =>
                {
                    if (ScenarioFrame.CanGoBack)
                    {
                        e.Handled = true;
                        ScenarioFrame.GoBack();
                    }
                };
            }


            if (ApiInformation.IsTypePresent(typeof(StatusBar).ToString()))
            {
                StatusBar statusBar = StatusBar.GetForCurrentView();
                statusBar.HideAsync();
            }

            ToastShow.currentMainPage = this;

            isLoading.PropertyChanged += IsLoading_PropertyChanged;

            Loaded += MainPage_Loaded;
        }
Esempio n. 2
0
 private void Back_Click(object sender, RoutedEventArgs e)
 {
     if (ScenarioFrame.CanGoBack)
     {
         ScenarioFrame.GoBack();
     }
 }
 void HardwareButtons_BackPressed(object sender, Windows.Phone.UI.Input.BackPressedEventArgs e)
 {
     if (ScenarioFrame.CanGoBack)
     {
         ScenarioFrame.GoBack();
         e.Handled = true;
     }
 }
Esempio n. 4
0
 private void SystemNavigationManager_BackRequested(object sender, BackRequestedEventArgs e)
 {
     if (ScenarioFrame.CanGoBack)
     {
         e.Handled = true;
         ScenarioFrame.GoBack();
     }
 }
Esempio n. 5
0
 private void backButton_Click(object sender, RoutedEventArgs e)
 {
     if (ScenarioFrame.CanGoBack)
     {
         ScenarioFrame.GoBack();
     }
     checkAdditionButtons();
 }
Esempio n. 6
0
        /// <summary>
        /// The hardware buttons back pressed.
        /// </summary>
        /// <param name="sender">
        /// The sender.
        /// </param>
        /// <param name="eventArgs">
        /// The event args.
        /// </param>
        private void HardwareButtonsBackPressed(object sender, BackPressedEventArgs eventArgs)
        {
            if (ScenarioFrame.CanGoBack)
            {
                ScenarioFrame.GoBack();

                // Indicate the back button press is handled so the app does not exit
                eventArgs.Handled = true;
            }
        }
Esempio n. 7
0
        void HardwareButtons_BackPressed(object sender, Windows.Phone.UI.Input.BackPressedEventArgs e)
        {
            if (ScenarioFrame.CanGoBack)
            {
                // Clear the status block when navigating
                NotifyUser(String.Empty, NotifyType.StatusMessage);

                ScenarioFrame.GoBack();

                //Indicate the back button press is handled so the app does not exit
                e.Handled = true;
            }
        }