static bool ShouldRecognizeTapsTogether(NativeGestureRecognizer gesture, NativeGestureRecognizer other) { // If multiple tap gestures are potentially firing (because multiple tap gesture recognizers have been // added to the XF Element), we want to allow them to fire simultaneously if they have the same number // of taps and touches #if __MOBILE__ var tap = gesture as UITapGestureRecognizer; #else var tap = gesture as NSClickGestureRecognizer; #endif if (tap == null) { return(false); } #if __MOBILE__ var otherTap = other as UITapGestureRecognizer; #else var otherTap = other as NSClickGestureRecognizer; #endif if (otherTap == null) { return(false); } if (!Equals(tap.View, otherTap.View)) { return(false); } #if __MOBILE__ if (tap.NumberOfTapsRequired != otherTap.NumberOfTapsRequired) #else if (tap.NumberOfClicksRequired != otherTap.NumberOfClicksRequired) #endif { return(false); } if (tap.NumberOfTouchesRequired != otherTap.NumberOfTouchesRequired) { return(false); } return(true); }
static IList <GestureElement> GetChildGestures( NativeGestureRecognizer sender, WeakReference weakEventTracker, WeakReference weakRecognizer, EventTracker eventTracker, View view) { if (!weakRecognizer.IsAlive) { return(null); } if (eventTracker._disposed || view == null) { return(null); } var originPoint = sender.LocationInView(eventTracker._renderer.NativeView); var childGestures = view.GetChildElements(new Point(originPoint.X, originPoint.Y)); return(childGestures); }
static IList <GestureElement>?GetChildGestures( NativeGestureRecognizer sender, WeakReference weakEventTracker, WeakReference weakRecognizer, GestureManager?eventTracker, View?view) { if (!weakRecognizer.IsAlive) { return(null); } if (eventTracker == null || eventTracker._disposed || view == null) { return(null); } var originPoint = sender.LocationInView(eventTracker._handler.PlatformView); var childGestures = view.GetChildElements(new Point(originPoint.X, originPoint.Y)); return(childGestures); }
public void Activated(UIGestureRecognizer sender) { action(sender); }
public virtual NSSet TouchesForGestureRecognizer(UIGestureRecognizer gesture) { return(default(NSSet)); }
public virtual void RequireGestureRecognizerToFail(UIGestureRecognizer otherGestureRecognizer) { }
public bool ShouldRecognizeSimultaneously(UIKit.UIGestureRecognizer gestureRecognizer, UIKit.UIGestureRecognizer otherGestureRecognizer) { return(true); }