diff --git a/Ooui.Forms/EventTracker.cs b/Ooui.Forms/EventTracker.cs index d9eb5b5..afa79f0 100644 --- a/Ooui.Forms/EventTracker.cs +++ b/Ooui.Forms/EventTracker.cs @@ -119,7 +119,7 @@ namespace Ooui.Forms var weakEventTracker = new WeakReference (this); var tapRecognizer = recognizer as TapGestureRecognizer; - if (tapRecognizer != null) { + if (tapRecognizer != null && tapRecognizer.NumberOfTapsRequired == 1) { var returnAction = new TargetEventHandler ((s, e) => { var tapGestureRecognizer = weakRecognizer.Target as TapGestureRecognizer; var eventTracker = weakEventTracker.Target as EventTracker; @@ -134,6 +134,21 @@ namespace Ooui.Forms }; return uiRecognizer; } + if (tapRecognizer != null && tapRecognizer.NumberOfTapsRequired == 2) { + var returnAction = new TargetEventHandler ((s, e) => { + var tapGestureRecognizer = weakRecognizer.Target as TapGestureRecognizer; + var eventTracker = weakEventTracker.Target as EventTracker; + var view = eventTracker?._renderer?.Element as View; + + if (tapGestureRecognizer != null && view != null) + tapGestureRecognizer.SendTapped (view); + }); + var uiRecognizer = new NativeGestureRecognizer { + EventType = "dblclick", + Handler = returnAction, + }; + return uiRecognizer; + } return null; }