Example #1
0
 void NavigationPopCallback(MessageBus bus, NavigationPopInfo navigationPopInfo)
 {
     if (navigationPopInfo == null)
     {
         throw new ArgumentNullException(nameof(navigationPopInfo));
     }
     if (_isBusy)
     {
         return;
     }
     _isBusy = true;
     Pop(navigationPopInfo);
 }
Example #2
0
 void NormalPop(NavigationPopInfo popInfo)
 {
     Device.BeginInvokeOnMainThread(async() => {
         try
         {
             await GetTopNavigation().PopAsync(popInfo.WithAnimtation);
             popInfo.OnCompletedTask.SetResult(true);
         }
         catch
         {
             popInfo.OnCompletedTask.SetResult(false);
         }
         finally
         {
             _isBusy = false;
         }
     });
 }
Example #3
0
        void Pop(NavigationPopInfo popInfo)
        {
            switch (popInfo.Mode)
            {
            case NavigationMode.Normal:
                NormalPop(popInfo);
                break;

            case NavigationMode.Modal:
                ModalPop(popInfo);
                break;

            case NavigationMode.Popup:
                PopupPop(popInfo);
                break;

            case NavigationMode.AllPopup:
                AllPopupPop(popInfo);
                break;

            default:
                throw new NotImplementedException();
            }
        }