public static void DismissByTapping(this IDismissable step, UIView view)
        {
            var tapGestureRecognizer = new UITapGestureRecognizer(() => step.Dismiss());

            view.AddGestureRecognizer(tapGestureRecognizer);

            addTooltipCloseIcon(view);
        }
        public static void DismissByTapping(this IDismissable step, PopupWindow popupWindow, Action cleanup = null)
        {
            Ensure.Argument.IsNotNull(popupWindow, nameof(popupWindow));

            void OnDismiss(object sender, EventArgs args)
            {
                popupWindow.Dismiss();
                step.Dismiss();
                cleanup();
            }

            popupWindow.ContentView.Click += OnDismiss;
        }
Example #3
0
        public static void DismissByTapping(this IDismissable step, PopupWindow popupWindow, Action cleanup = null)
        {
            if (popupWindow == null)
            {
                return;
            }

            void OnDismiss(object sender, EventArgs args)
            {
                popupWindow.Dismiss();
                step.Dismiss();
                cleanup();
            }

            popupWindow.ContentView.Click += OnDismiss;
        }