public PanGestureRecognizerHandler(NativeComponentRenderer renderer, XF.PanGestureRecognizer panGestureRecognizerControl) : base(renderer, panGestureRecognizerControl) { PanGestureRecognizerControl = panGestureRecognizerControl ?? throw new ArgumentNullException(nameof(panGestureRecognizerControl)); ConfigureEvent( eventName: "onpanupdated", setId: id => PanUpdatedEventHandlerId = id, clearId: id => { if (PanUpdatedEventHandlerId == id) { PanUpdatedEventHandlerId = 0; } }); PanGestureRecognizerControl.PanUpdated += (s, e) => { if (PanUpdatedEventHandlerId != default) { renderer.Dispatcher.InvokeAsync(() => renderer.DispatchEventAsync(PanUpdatedEventHandlerId, null, e)); } }; }
public static PanGestureRecognizerEvents Events(this PanGestureRecognizer This) { return(new PanGestureRecognizerEvents(This)); }
public PanGestureRecognizerEvents(PanGestureRecognizer This) : base(This) { this.This = This; }