Share via


GestureRecognizer.Holding 事件

定義

當使用者使用單一觸控、滑鼠或手寫筆/手寫筆接觸) 執行按住手勢 (時發生。

// Register
event_token Holding(TypedEventHandler<GestureRecognizer, HoldingEventArgs const&> const& handler) const;

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

// Revoke with event_revoker
GestureRecognizer::Holding_revoker Holding(auto_revoke_t, TypedEventHandler<GestureRecognizer, HoldingEventArgs const&> const& handler) const;
public event TypedEventHandler<GestureRecognizer,HoldingEventArgs> Holding;
function onHolding(eventArgs) { /* Your code */ }
gestureRecognizer.addEventListener("holding", onHolding);
gestureRecognizer.removeEventListener("holding", onHolding);
- or -
gestureRecognizer.onholding = onHolding;
Public Custom Event Holding As TypedEventHandler(Of GestureRecognizer, HoldingEventArgs) 

事件類型

備註

若要支援按住觸控和手寫筆/手寫筆輸入,請在 GestureSettings 屬性中指定 Hold

若要支援使用滑鼠輸入保留,請在 GestureSettings 屬性中指定 HoldWithMouse

Holding 事件會引發兩次:一次當保留開始時 (啟動) ,並在保留結束時再次引發 (完成取消) 。

適用於

另請參閱