Beispiel #1
0
 public void PresentationControllerDidDismiss(UIPresentationController presentationController)
 {
     if (DidDismiss != null)
     {
         DidDismiss(presentationController);
     }
 }
Beispiel #2
0
        public void DidDismiss(UIPresentationController _)
        {
            var window = (_modal.VirtualView as Page)?.Window;

            if (window?.Page is Shell shell)
            {
                // The modal page might have a NavigationPage so it's not enough to just send
                // GotoAsync(..) we need build up what the uri will be once the last modal page is removed
                // and then submit that to shell
                var modalStack = new List <Page>(shell.CurrentItem.CurrentItem.Navigation.ModalStack);
                if (modalStack.Count > 0)
                {
                    modalStack.RemoveAt(modalStack.Count - 1);
                }

                var result = ShellNavigationManager.GetNavigationParameters(
                    shell.CurrentItem,
                    shell.CurrentItem.CurrentItem,
                    shell.CurrentItem.CurrentItem.CurrentItem,
                    shell.CurrentItem.CurrentItem.Stack, modalStack);

                shell.NavigationManager.GoToAsync(result).FireAndForget();
            }
            else
            {
                ((Page)_modal.VirtualView).Navigation.PopModalAsync(false).FireAndForget();
            }
        }
Beispiel #3
0
 public void PresentationControllerWillDismiss(UIPresentationController presentationController)
 {
     if (WillDismiss != null)
     {
         WillDismiss(presentationController);
     }
 }
		public override UIPresentationController GetPresentationControllerForPresentedViewController (
			UIViewController presentedViewController,
			UIViewController presentingViewController,
			UIViewController sourceViewController)
		{
			presentationController = new CoolPresentationController (presentedViewController, presentingViewController);
			return presentationController;
		}
 public override UIPresentationController GetPresentationControllerForPresentedViewController(
     UIViewController presentedViewController,
     UIViewController presentingViewController,
     UIViewController sourceViewController)
 {
     presentationController = new CoolPresentationController(presentedViewController, presentingViewController);
     return(presentationController);
 }
Beispiel #6
0
 public bool PresentationControllerShouldDismiss(UIPresentationController presentationController)
 {
     if (ShouldDismiss != null)
     {
         return(ShouldDismiss(presentationController));
     }
     else
     {
         return(true);    // view should be dismissible by default
     }
 }
		public UIKit.UIViewController GetViewControllerForAdaptivePresentation (UIPresentationController controller, UIModalPresentationStyle style)
		{
			/*
			Load and return the adapted view controller from the Detail storyboard. 
			That storyboard is stored within the same bundle that contains this 
			class.
			*/

			var adaptableFormSheetSegueBundle = NSBundle.FromClass (new Class (typeof(AdaptableFormSheetSegue)));
			return UIStoryboard.FromName ("Detail", adaptableFormSheetSegueBundle).InstantiateViewController ("Adapted");
		}
Beispiel #8
0
        public UIKit.UIViewController GetViewControllerForAdaptivePresentation(UIPresentationController controller, UIModalPresentationStyle style)
        {
            /*
             * Load and return the adapted view controller from the Detail storyboard.
             * That storyboard is stored within the same bundle that contains this
             * class.
             */

            var adaptableFormSheetSegueBundle = NSBundle.FromClass(new Class(typeof(AdaptableFormSheetSegue)));

            return(UIStoryboard.FromName("Detail", adaptableFormSheetSegueBundle).InstantiateViewController("Adapted"));
        }
Beispiel #9
0
        public UIViewController GetViewControllerForAdaptivePresentation(UIPresentationController controller, UIModalPresentationStyle style)
        {
            var navController = new UINavigationController(controller.PresentedViewController);

            if (navController != null)
            {
                var closeText = GetPopoverCloseText(navController.TopViewController);
                doneItem          = new UIBarButtonItem(closeText, UIBarButtonItemStyle.Done, null);
                doneItem.Clicked += DoneTapped;
                navController.TopViewController.NavigationItem.RightBarButtonItem = doneItem;
            }

            return(navController);
        }
Beispiel #10
0
 public override void DidDismiss(UIPresentationController controller)
 => _taskCompletionSource.SetResult(null);
 public UIModalPresentationStyle GetAdaptivePresentationStyle(UIPresentationController controller, UITraitCollection traitCollection)
 {
     return(UIModalPresentationStyle.None);
 }
		public async void DidDismiss(UIPresentationController presentationController)
		{
			await Application.Current.NavigationProxy.PopModalAsync(false);
		}
Beispiel #13
0
 public override void DidDismiss(UIPresentationController presentationController) =>
 PickHandler?.Invoke(null);
Beispiel #14
0
 public override UIModalPresentationStyle GetAdaptivePresentationStyle(
     UIPresentationController forPresentationController) => UIModalPresentationStyle.None;
Beispiel #15
0
 public override void DidDismiss(UIPresentationController presentationController)
 {
     _dismissModal();
 }
 public override void DidDismiss(UIPresentationController presentationController)
 {
     ActivityMediator.Instance.Cancel();
 }
Beispiel #17
0
 public UIModalPresentationStyle GetAdaptivePresentationStyle(UIPresentationController forPresentationController)
 {
     return(UIModalPresentationStyle.FullScreen);
 }
Beispiel #18
0
 public override void DidDismiss(UIPresentationController presentationController)
 {
     _presenter.ClosedModalViewController(_viewController, _attribute);
 }
Beispiel #19
0
 public static UIViewController GetAdaptivePresentationStyle(IUIAdaptivePresentationControllerDelegate This, UIPresentationController controller, UIModalPresentationStyle style)
 {
     return null;
 }
Beispiel #20
0
 public virtual UIViewController GetAdaptivePresentationStyle(UIPresentationController controller, UIModalPresentationStyle style)
 {
     return null;
 }
Beispiel #21
0
 public override UIModalPresentationStyle GetAdaptivePresentationStyle(UIPresentationController forPresentationController)
 {
     return(_getAdaptivePresentationStyle(forPresentationController));
 }
 public override UIViewController GetViewControllerForAdaptivePresentation(UIPresentationController controller, UIModalPresentationStyle style)
 {
     return(new UINavigationController(controller.PresentedViewController));
 }
Beispiel #23
0
 public override void DidDismiss(UIPresentationController presentationController)
 {
     _viewController.TableView.ReloadData();
 }
Beispiel #24
0
 public UIModalPresentationStyle GetAdaptivePresentationStyle(UIPresentationController controller, UITraitCollection traitCollection)
 {
     return(traitCollection.HorizontalSizeClass == UIUserInterfaceSizeClass.Compact ? UIModalPresentationStyle.FullScreen : UIModalPresentationStyle.FormSheet);
 }
		public UIModalPresentationStyle GetAdaptivePresentationStyle (UIPresentationController controller, UITraitCollection traitCollection)
		{
			return traitCollection.HorizontalSizeClass == UIUserInterfaceSizeClass.Compact ? UIModalPresentationStyle.FullScreen : UIModalPresentationStyle.FormSheet;
		}
 public override bool ShouldDismiss(UIPresentationController presentationController)
 {
     return(true);
 }
Beispiel #27
0
 public UIModalPresentationStyle GetAdaptivePresentationStyle(UIPresentationController controller)
 {
     return(UIModalPresentationStyle.None);
 }
 public void DidDismiss(UIPresentationController presentationController)
 {
     ReplSceneDelegate.Instance?.SetActiveScreen(this);
 }
Beispiel #29
0
 public override UIModalPresentationStyle GetAdaptivePresentationStyle(UIPresentationController controller,
                                                                       UITraitCollection traitCollection) => UIModalPresentationStyle.None;
Beispiel #30
0
 public override void DidDismiss(UIPresentationController presentationController)
 {
     _taskCompletionSource.TrySetResult(Array.Empty <SampleItem>());
 }
Beispiel #31
0
 public void DidDismiss(UIPresentationController presentationController)
 {
     closedAction.Invoke();
 }
		UIModalPresentationStyle AdaptivePresentationStyleForPresentationController (UIPresentationController controller)
		{
			return UIModalPresentationStyle.None;
		}
Beispiel #33
0
 public override void DidDismiss(UIPresentationController presentationController)
 {
     dismissHandler?.Invoke();
     dismissHandler = null;
 }
 public override void DidDismiss(UIPresentationController presentationController)
 {
     DismissModalAction?.Invoke();
 }