SpatialInteractionManager.SourcePressed 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 hand, motion controller, or speech source has entered a pressed state.
// Register
event_token SourcePressed(TypedEventHandler<SpatialInteractionManager, SpatialInteractionSourceEventArgs const&> const& handler) const;
// Revoke with event_token
void SourcePressed(event_token const* cookie) const;
// Revoke with event_revoker
SpatialInteractionManager::SourcePressed_revoker SourcePressed(auto_revoke_t, TypedEventHandler<SpatialInteractionManager, SpatialInteractionSourceEventArgs const&> const& handler) const;
public event TypedEventHandler<SpatialInteractionManager,SpatialInteractionSourceEventArgs> SourcePressed;
function onSourcePressed(eventArgs) { /* Your code */ }
spatialInteractionManager.addEventListener("sourcepressed", onSourcePressed);
spatialInteractionManager.removeEventListener("sourcepressed", onSourcePressed);
- or -
spatialInteractionManager.onsourcepressed = onSourcePressed;
Public Custom Event SourcePressed As TypedEventHandler(Of SpatialInteractionManager, SpatialInteractionSourceEventArgs)
Event Type
Remarks
Inspect the PressKind to determine the nature of the press.