Ejemplo n.º 1
0
 public void PresentationControllerDidDismiss(UIPresentationController presentationController)
 {
     if (DidDismiss != null)
     {
         DidDismiss(presentationController);
     }
 }
Ejemplo n.º 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();
            }
        }
Ejemplo n.º 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);
 }
Ejemplo n.º 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");
		}
Ejemplo n.º 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"));
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 10
0
 public override void DidDismiss(UIPresentationController controller)
 => _taskCompletionSource.SetResult(null);
 public UIModalPresentationStyle GetAdaptivePresentationStyle(UIPresentationController controller, UITraitCollection traitCollection)
 {
     return(UIModalPresentationStyle.None);
 }
Ejemplo n.º 12
0
		public async void DidDismiss(UIPresentationController presentationController)
		{
			await Application.Current.NavigationProxy.PopModalAsync(false);
		}
Ejemplo n.º 13
0
 public override void DidDismiss(UIPresentationController presentationController) =>
 PickHandler?.Invoke(null);
Ejemplo n.º 14
0
 public override UIModalPresentationStyle GetAdaptivePresentationStyle(
     UIPresentationController forPresentationController) => UIModalPresentationStyle.None;
Ejemplo n.º 15
0
 public override void DidDismiss(UIPresentationController presentationController)
 {
     _dismissModal();
 }
 public override void DidDismiss(UIPresentationController presentationController)
 {
     ActivityMediator.Instance.Cancel();
 }
Ejemplo n.º 17
0
 public UIModalPresentationStyle GetAdaptivePresentationStyle(UIPresentationController forPresentationController)
 {
     return(UIModalPresentationStyle.FullScreen);
 }
Ejemplo n.º 18
0
 public override void DidDismiss(UIPresentationController presentationController)
 {
     _presenter.ClosedModalViewController(_viewController, _attribute);
 }
Ejemplo n.º 19
0
 public static UIViewController GetAdaptivePresentationStyle(IUIAdaptivePresentationControllerDelegate This, UIPresentationController controller, UIModalPresentationStyle style)
 {
     return null;
 }
Ejemplo n.º 20
0
 public virtual UIViewController GetAdaptivePresentationStyle(UIPresentationController controller, UIModalPresentationStyle style)
 {
     return null;
 }
Ejemplo n.º 21
0
 public override UIModalPresentationStyle GetAdaptivePresentationStyle(UIPresentationController forPresentationController)
 {
     return(_getAdaptivePresentationStyle(forPresentationController));
 }
 public override UIViewController GetViewControllerForAdaptivePresentation(UIPresentationController controller, UIModalPresentationStyle style)
 {
     return(new UINavigationController(controller.PresentedViewController));
 }
Ejemplo n.º 23
0
 public override void DidDismiss(UIPresentationController presentationController)
 {
     _viewController.TableView.ReloadData();
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 27
0
 public UIModalPresentationStyle GetAdaptivePresentationStyle(UIPresentationController controller)
 {
     return(UIModalPresentationStyle.None);
 }
Ejemplo n.º 28
0
 public void DidDismiss(UIPresentationController presentationController)
 {
     ReplSceneDelegate.Instance?.SetActiveScreen(this);
 }
Ejemplo n.º 29
0
 public override UIModalPresentationStyle GetAdaptivePresentationStyle(UIPresentationController controller,
                                                                       UITraitCollection traitCollection) => UIModalPresentationStyle.None;
Ejemplo n.º 30
0
 public override void DidDismiss(UIPresentationController presentationController)
 {
     _taskCompletionSource.TrySetResult(Array.Empty <SampleItem>());
 }
Ejemplo n.º 31
0
 public void DidDismiss(UIPresentationController presentationController)
 {
     closedAction.Invoke();
 }
		UIModalPresentationStyle AdaptivePresentationStyleForPresentationController (UIPresentationController controller)
		{
			return UIModalPresentationStyle.None;
		}
Ejemplo n.º 33
0
 public override void DidDismiss(UIPresentationController presentationController)
 {
     dismissHandler?.Invoke();
     dismissHandler = null;
 }
 public override void DidDismiss(UIPresentationController presentationController)
 {
     DismissModalAction?.Invoke();
 }