Share via


SpatialGestureRecognizer.RecognitionStarted Event

Definition

Occurs when gesture recognition begins (this is the first event to fire).

// Register
event_token RecognitionStarted(TypedEventHandler<SpatialGestureRecognizer, SpatialRecognitionStartedEventArgs const&> const& handler) const;

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

// Revoke with event_revoker
SpatialGestureRecognizer::RecognitionStarted_revoker RecognitionStarted(auto_revoke_t, TypedEventHandler<SpatialGestureRecognizer, SpatialRecognitionStartedEventArgs const&> const& handler) const;
public event TypedEventHandler<SpatialGestureRecognizer,SpatialRecognitionStartedEventArgs> RecognitionStarted;
function onRecognitionStarted(eventArgs) { /* Your code */ }
spatialGestureRecognizer.addEventListener("recognitionstarted", onRecognitionStarted);
spatialGestureRecognizer.removeEventListener("recognitionstarted", onRecognitionStarted);
- or -
spatialGestureRecognizer.onrecognitionstarted = onRecognitionStarted;
Public Custom Event RecognitionStarted As TypedEventHandler(Of SpatialGestureRecognizer, SpatialRecognitionStartedEventArgs) 

Event Type

Remarks

The SpatialRecognitionStartedEventArgs event fires when there is no active gesture and the gesture recognizer is told to capture an interaction. Events only fire if the interaction can trigger at least one of the gestures requested in SpatialGestureSettings.

For hand interactions, this event fires on finger press.

For speech interactions, this event fires when a system voice command such as "Select" is spoken.

For motion controllers, this event fires when the Select trigger or button is pressed.

Applies to