public TestPage() { Label l = new Label { Text = "Gesture test/n/n/nTest here", }; GesturesContentView g = new GesturesContentView { Content = l, }; GestureInterest gi1 = new GestureInterest { GestureType = GestureType.LongPress }; GestureInterest gi2 = new GestureInterest { GestureType = GestureType.DoubleTap }; List <GestureInterest> gilist = new List <GestureInterest>(); gilist.Add(gi1); gilist.Add(gi2); IEnumerable <GestureInterest> gintrest = gilist; g.RegisterInterests(l, gintrest); g.GestureRecognized += G_GestureRecognized1; Content = g; }
private void SatisfyInterest(GestureInterest gi, GestureResult args) { var commandparam = gi.GestureParameter ?? args.StartView.BindingContext ?? BindingContext; if (gi.GestureCommand != null && gi.GestureCommand.CanExecuteGesture(args, gi.GestureParameter)) { gi.GestureCommand.ExecuteGesture(args, commandparam); } var handler = GestureRecognized; if (handler != null) { handler(args.StartView, args); } }