GestureRecognizer.Holding Event
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Remarks
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
- TypedEventHandler<TSender,TResult>
- HoldingEventArgs
- Input and interactions
- User interaction mode sample
- Focus visuals sample
- Input: Device capabilities sample
- Input: Simplified ink sample
- Input: Windows 8 gestures sample
- Input: XAML user input events sample
- XAML scrolling, panning, and zooming sample
- DirectX touch input sample
- Input: Manipulations and gestures (C++) sample
- Input: Touch hit testing sample
- Input source identification sample
- Touch injection sample
- Win32 touch hit-testing sample