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; }
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; }