共用方式為


SpatialGestureRecognizer.Tapped 事件

定義

發生于辨識 Tap 或 DoubleTap 手勢時。

// Register
event_token Tapped(TypedEventHandler<SpatialGestureRecognizer, SpatialTappedEventArgs const&> const& handler) const;

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

// Revoke with event_revoker
SpatialGestureRecognizer::Tapped_revoker Tapped(auto_revoke_t, TypedEventHandler<SpatialGestureRecognizer, SpatialTappedEventArgs const&> const& handler) const;
public event TypedEventHandler<SpatialGestureRecognizer,SpatialTappedEventArgs> Tapped;
function onTapped(eventArgs) { /* Your code */ }
spatialGestureRecognizer.addEventListener("tapped", onTapped);
spatialGestureRecognizer.removeEventListener("tapped", onTapped);
- or -
spatialGestureRecognizer.ontapped = onTapped;
Public Custom Event Tapped As TypedEventHandler(Of SpatialGestureRecognizer, SpatialTappedEventArgs) 

事件類型

備註

針對手部互動, SpatialTappedEventArgs 事件會在手指按下之後在手指放開時引發。

針對語音互動,此事件會在處理系統語音命令 「Select」 之後引發。

針對動作控制器互動,當按下 [選取] 觸發程式或按鈕時,就會引發此事件。

適用於