public void HandlePointerInput( PointerInputEvent inputEvent, ref GestureEventResult result) { if (inputEvent.State == PointerInputState.Began) { this._delegate.OnTouchBegan(); } else if (inputEvent.State == PointerInputState.Ended) { this._delegate.OnTouchEnded(); } else if (inputEvent.State == PointerInputState.Canceled) { this._delegate.OnTouchCanceled(); } this.OnPointerInput(inputEvent, ref result); if ((this.State == GestureState.Recognized) || (this.State == GestureState.Failed) || (this.State == GestureState.Canceled)) { // Reset on reaching a terminal node in the state machine this.Reset(); } }
private bool HandleLightDismissEvent( View view, PointerInputEvent pointerInputEvent) { bool handled = false; if (pointerInputEvent.State == PointerInputState.Began) { LightDismissControl lightDismissControl = this.LightDismissControl; if (null != lightDismissControl) { if (!lightDismissControl.HasDescendant(view)) { // Invoke light dismiss lightDismissControl.OnLightDismiss(); this.LightDismissControl = null; handled = true; } } } return(handled); }
public virtual bool HandlePointerEvent( PointerInputEvent pointerInputEvent) { if (this.Application.HandlePreviewInput(this, pointerInputEvent)) { return(true); } GestureEventResult result = new GestureEventResult(); this.GestureRecognizer?.HandlePointerInput(pointerInputEvent, ref result); return(result.DidHandleEvent); }
internal bool HandlePreviewInput( Page page, PointerInputEvent pointerInputEvent) { bool handled = false; if (pointerInputEvent.State == PointerInputState.Began) { LightDismissControl lightDismissControl = this.LightDismissControl; if (null != lightDismissControl) { // Invoke light dismiss lightDismissControl.OnLightDismiss(); this.LightDismissControl = null; handled = true; } } return(handled); }
public override bool HandlePointerEvent( PointerInputEvent pointerInputEvent) { return this.Application.HandlePreviewInput(this, pointerInputEvent); }
protected abstract void OnPointerInput( PointerInputEvent inputEvent, ref GestureEventResult result);
internal bool HandlePreviewInput( View view, PointerInputEvent pointerInputEvent) { return(this.HandleLightDismissEvent(view, pointerInputEvent)); }