GestureRecognizer.Holding Event


Occurs when a user performs a press and hold gesture (with a single touch, mouse, or pen/stylus contact).

// Register
event_token Holding(TypedEventHandler<GestureRecognizer, HoldingEventArgs const&> const& handler) const;

// Revoke with event_token
void Holding(event_token const* cookie) const;

// Revoke with event_revoker
GestureRecognizer::Holding_revoker Holding(auto_revoke_t, TypedEventHandler<GestureRecognizer, HoldingEventArgs const&> const& handler) const;
public event TypedEventHandler<GestureRecognizer,HoldingEventArgs> Holding;
function onHolding(eventArgs) { /* Your code */ }
gestureRecognizer.addEventListener("holding", onHolding);
gestureRecognizer.removeEventListener("holding", onHolding);
- or -
gestureRecognizer.onholding = onHolding;
Public Custom Event Holding As TypedEventHandler(Of GestureRecognizer, HoldingEventArgs) 

Event Type



To support Holding with touch and pen/stylus input, specify Hold in the GestureSettings property.

To support Holding with mouse input, specify HoldWithMouse in the GestureSettings property.

The Holding event is fired twice: Once when holding starts (started) and again when holding ends (completed or canceled).

Applies to

See also