SpatialInteractionSourceState.IsPressed Property


Gets whether a hand or motion controller is experiencing any press.

 property bool IsPressed { bool get(); };
bool IsPressed();
public bool IsPressed { get; }
var boolean = spatialInteractionSourceState.isPressed;
Public ReadOnly Property IsPressed As Boolean

Property Value



Whether the source is experiencing any press.


This can be because a hand has a finger pressed or a motion controller has any button pressed.

To determine which specific presses are occurring, inspect the state's more specific properties such as IsSelectPressed, IsMenuPressed or IsGrasped. If this source is a motion controller, there are further controller-specific properties to inspect within the state's ControllerProperties.

Note that a voice "Select" causes an instant press and release, and so you cannot poll for a voice press using IsPressed, IsSelectPressed or SelectPressedValue. Instead, use a SpatialGestureRecognizer and handle the Tapped event, or handle the SourcePressed event.

Applies to