共用方式為


SpatialGestureRecognizer.HoldStarted 事件

定義

當互動變成 保留 手勢時發生。

// Register
event_token HoldStarted(TypedEventHandler<SpatialGestureRecognizer, SpatialHoldStartedEventArgs const&> const& handler) const;

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

// Revoke with event_revoker
SpatialGestureRecognizer::HoldStarted_revoker HoldStarted(auto_revoke_t, TypedEventHandler<SpatialGestureRecognizer, SpatialHoldStartedEventArgs const&> const& handler) const;
public event TypedEventHandler<SpatialGestureRecognizer,SpatialHoldStartedEventArgs> HoldStarted;
function onHoldStarted(eventArgs) { /* Your code */ }
spatialGestureRecognizer.addEventListener("holdstarted", onHoldStarted);
spatialGestureRecognizer.removeEventListener("holdstarted", onHoldStarted);
- or -
spatialGestureRecognizer.onholdstarted = onHoldStarted;
Public Custom Event HoldStarted As TypedEventHandler(Of SpatialGestureRecognizer, SpatialHoldStartedEventArgs) 

事件類型

備註

針對手部互動,當手指按住超過保留時間閾值時, SpatialHoldStartedEventArgs 事件就會引發。

針對語音互動,此事件不會引發。

對於動作控制器互動,當 [選取] 觸發程式或按鈕按住超過 [保留時間閾值] 時,就會引發此事件。

適用於