語言

UIElement.ManipulationStarted 活動

定義

當輸入裝置開始對 UIElement 進行操作時,會發生這種情況。

// Register
event_token ManipulationStarted(ManipulationStartedEventHandler const& handler) const;

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

// Revoke with event_revoker
UIElement::ManipulationStarted_revoker ManipulationStarted(auto_revoke_t, ManipulationStartedEventHandler const& handler) const;
public event ManipulationStartedEventHandler ManipulationStarted;
function onManipulationStarted(eventArgs) { /* Your code */ }
uIElement.addEventListener("manipulationstarted", onManipulationStarted);
uIElement.removeEventListener("manipulationstarted", onManipulationStarted);
- or -
uIElement.onmanipulationstarted = onManipulationStarted;
Public Custom Event ManipulationStarted As ManipulationStartedEventHandler 
<uiElement ManipulationStarted="eventhandler"/>

事件類型

備註

關於自訂控制與互動體驗,請參見 GestureRecognizer.ManipulationStarted。

ManipulationStarted 表示操作識別邏輯偵測到指標移動。 此時它是典型序列中第二次觸發的操作事件,發生在 ManipulationStarting之後,但在 ManipulationDelta 之前,或是其他事件如 ManipulationInertiaStarting。

元素必須具有 ManipulationMode 值 None ,且非 或 System 是操作事件來源。 預設值 ManipulationMode 為 System,允許內建控制邏輯處理操作,但不允許應用程式程式碼處理操作事件。 如果你想處理操作,可以設定 ManipulationMode 為 All,或是特定的 ManipulationModes 值。 如需詳細資訊,請參閱 ManipulationMode。

ManipulationStarted 是路由事件。 如果事件因未被處理而被允許冒泡到父元素,那麼即使 ManipulationMode 是 None 父元素或 System 父元素,事件仍可處理。 欲了解更多路由事件概念,請參閱 事件與路由事件總覽。

對於觸控動作,以及觸控動作結果的互動特定或操作事件,元素必須是點擊測試可見的,才能成為事件來源,並引發與動作相關聯的事件。 UIElement.Visibility 必須是 可見的。 衍生型別的其他特性也會影響命中測試的可見性。 如需詳細資訊,請參閱事件與路由事件概觀。

ManipulationStarted 支援即使事件資料標記 為已處理,也能將事件處理器附加到將被呼叫的路由上。 請參見 AddHandler。

適用於

另請參閱