Interface IGestureEvents
Represents the gestures recognized from touch contacts and mouse buttons - the single source of pointer gestures on every engine.
public interface IGestureEvents : IInputEventProvider, IUpdateableInput, IInitializable
- Inherited Members
- Extension Methods
Remarks
Engines only report raw contacts (Contacts) and mouse buttons. Recognition happens here, so thresholds and behavior are identical everywhere. All positions are in physical pixels.
Per pointer kind (see PointerKind):
- Touch and MouseLeft tap, hold and drag.
- MouseRight raises Held on release.
- MouseMiddle only drags.
- Two touch contacts pinch. A second finger cancels the first finger's drag; after a pinch, the remaining fingers stay inert until all are lifted.
Mouse presses are ignored while any touch contact is active and for a short moment after the last one lifts, because the OS synthesizes mouse input from touch (on Windows, a tap's click arrives after the finger lifts). Mouse releases always go through, so a button pressed before the touch began still ends its gesture.
Properties
Settings
Gets the recognition thresholds.
GestureSettings Settings { get; }
Property Value
Events
DragCanceled
Occurs when a drag ends without a release - a second finger started a pinch, or the contact vanished.
event EventHandler<GenericEventArgs<DragInfo>>? DragCanceled
Event Type
DragCompleted
Occurs when a dragging pointer is released. Velocity holds the release velocity.
event EventHandler<GenericEventArgs<DragInfo>>? DragCompleted
Event Type
DragMoved
Occurs when a dragging pointer moves.
event EventHandler<GenericEventArgs<DragInfo>>? DragMoved
Event Type
DragStarted
Occurs when a press moves past Slop. Set Cancel to reject the drag: no further drag events are raised for that press.
event EventHandler<AcceptableEventArgs<DragInfo>>? DragStarted
Event Type
Held
Occurs when a touch or left-mouse press stays inside Slop for HoldDelay, or when the right mouse button is released.
event EventHandler<GenericEventArgs<PointerInfo>>? Held
Event Type
PinchChanged
Occurs when a pinching finger moves.
event EventHandler<GenericEventArgs<PinchInfo>>? PinchChanged
Event Type
PinchCompleted
Occurs when either pinching finger is lifted or vanishes.
event EventHandler<GenericEventArgs<PinchInfo>>? PinchCompleted
Event Type
PinchStarted
Occurs when a second touch contact lands and a pinch begins.
event EventHandler<GenericEventArgs<PinchInfo>>? PinchStarted
Event Type
PointerPressed
Occurs when a pointer is pressed.
event EventHandler<GenericEventArgs<PointerInfo>>? PointerPressed
Event Type
PointerReleased
Occurs when a pointer is released, or its contact vanished.
event EventHandler<GenericEventArgs<PointerInfo>>? PointerReleased
Event Type
Tapped
event EventHandler<GenericEventArgs<TapInfo>>? Tapped