예제 #1
0
        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));
                }
            };
        }
예제 #2
0
 public static PanGestureRecognizerEvents Events(this PanGestureRecognizer This)
 {
     return(new PanGestureRecognizerEvents(This));
 }
예제 #3
0
 public PanGestureRecognizerEvents(PanGestureRecognizer This)
     : base(This)
 {
     this.This = This;
 }