Exemplo n.º 1
0
        /// <summary>
        /// Closes the entire popup/frame
        /// </summary>
        public void ClosePopup()
        {
            if (RequestClose != null)
            {
                RequestClose(this, new EventArgs());
            }

            SystemNavigationManagerEnhanced.GetForCurrentView().BackRequested -= PopupFrame_BackRequested;
        }
Exemplo n.º 2
0
        protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)
        {
            base.OnNavigatingFrom(e);

            var navManager = SystemNavigationManagerEnhanced.GetForCurrentView();

            navManager.BackRequested -= NavManager_BackRequested;

            if (UseAutomaticBackButton)
            {
                navManager.AppViewBackButtonVisibility = AppViewBackButtonVisibility.Collapsed;
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// Goes back, or closes the popup if can't go back
        /// </summary>
        public new void GoBack()
        {
            SystemNavigationManagerEnhanced.GetForCurrentView().AppViewBackButtonVisibility = Windows.UI.Core.AppViewBackButtonVisibility.Collapsed;

            if (base.CanGoBack)
            {
                base.GoBack();
            }

            else
            {
                ClosePopup();
            }
        }
        public static SystemNavigationManagerEnhanced GetForCurrentView()
        {
            SystemNavigationManagerEnhanced answer;

            var original = SystemNavigationManager.GetForCurrentView();

            if (!_cached.TryGetValue(original, out answer))
            {
                answer = new SystemNavigationManagerEnhanced(original);

                _cached[original] = answer;
            }

            return(answer);
        }
Exemplo n.º 5
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);

            if (!_isLoaded || e.NavigationMode == NavigationMode.New)
            {
                _isLoaded = true;
                this.OnLoaded(e);
            }

            var navManager = SystemNavigationManagerEnhanced.GetForCurrentView();

            navManager.BackRequested += NavManager_BackRequested;

            if (UseAutomaticBackButton)
            {
                UpdateAutoAppViewBackButtonVisibility();
            }
        }
Exemplo n.º 6
0
 public PopupFrame()
 {
     SystemNavigationManagerEnhanced.GetForCurrentView().BackRequested += PopupFrame_BackRequested;
 }