コード例 #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);
     };
 }
コード例 #2
0
 public void LeftFrameNavi(Action <Frame> action)
 {
     action(LeftFrame);
     LeftFrameContentChange?.Invoke(this, true);
     SystemNavigationManager.GetForCurrentView().AppViewBackButtonVisibility = AppViewBackButtonVisibility.Visible;
 }