Esempio n. 1
0
 public FrameManagerBase()
 {
     // FrameManager = this;
     // SystemNavigationManager.GetForCurrentView().BackRequested += FrameManagerBase_BackRequested; ;
     FrameHelpers.action += () =>
     {
         if (RightFrame == null)
         {
             return(false);
         }
         if (RightFrame.CanGoBack)
         {
             RightFrame.GoBack();
             RightFrameContentChange?.Invoke(this, RightFrame.CanGoBack);
         }
         else if (LeftFrame.CanGoBack)
         {
             LeftFrame.GoBack();
             LeftFrameContentChange?.Invoke(this, LeftFrame.CanGoBack);
         }
         else
         {
             return(false);
         }
         SystemNavigationManager.GetForCurrentView().AppViewBackButtonVisibility = RightFrame.CanGoBack || LeftFrame.CanGoBack
             ? AppViewBackButtonVisibility.Visible
             : SystemNavigationManager.GetForCurrentView().AppViewBackButtonVisibility == AppViewBackButtonVisibility.Visible
                 ? AppViewBackButtonVisibility.Visible
                 : AppViewBackButtonVisibility.Collapsed;
         return(true);
     };
 }
Esempio n. 2
0
        public void RightFrameClearAndNav(Action <Frame> action)
        {
            action(RightFrame);
            while (RightFrame.BackStack.Count > 1)
            {
                RightFrame.BackStack.RemoveAt(1);
            }


            RightFrameContentChange?.Invoke(this, true);
            SystemNavigationManager.GetForCurrentView().AppViewBackButtonVisibility = AppViewBackButtonVisibility.Visible;
        }
Esempio n. 3
0
        public bool RightFrameGoback()
        {
            if (RightFrame.CanGoBack)
            {
                RightFrame.GoBack();
                RightFrameContentChange?.Invoke(this, RightFrame.CanGoBack);
                SystemNavigationManager.GetForCurrentView().AppViewBackButtonVisibility = RightFrame.CanGoBack
                    ? AppViewBackButtonVisibility.Visible
                    : AppViewBackButtonVisibility.Collapsed;

                return(true);
            }
            else
            {
                return(false);
            }
        }
Esempio n. 4
0
 protected virtual void OnRightFrameContentChange(bool e)
 {
     RightFrameContentChange?.Invoke(this, e);
 }
Esempio n. 5
0
 public void RightFrameAndNav(Action <Frame> action)
 {
     action(RightFrame);
     RightFrameContentChange?.Invoke(this, true);
     SystemNavigationManager.GetForCurrentView().AppViewBackButtonVisibility = AppViewBackButtonVisibility.Visible;
 }