private void FireEvent(TouchRecognizer recognizer, long id, DragDrop.View.MyEffect.TouchEventArgs.TouchEventType actionType, UITouch touch, bool isInContact) { // Convert touch location to Xamarin.Forms Point value CGPoint cgPoint = touch.LocationInView(recognizer.View); Point xfPoint = new Point(cgPoint.X, cgPoint.Y); // Get the method to call for firing events Action <Element, DragDrop.View.MyEffect.TouchEventArgs> onTouchAction = recognizer.touchEffect.OnTouchEvent; // Call that method onTouchAction(recognizer.element, new DragDrop.View.MyEffect.TouchEventArgs(id, actionType, xfPoint, isInContact)); }
private void FireEvent(TouchEffect touchEffect, int id, DragDrop.View.MyEffect.TouchEventArgs.TouchEventType eventType, Point pointerLocation, bool isInContact) { var args = new DragDrop.View.MyEffect.TouchEventArgs(id, eventType, pointerLocation, isInContact); tEffect.OnTouchEvent(element, args); }