UIElement.ManipulationDelta 事件
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
當輸入裝置在操作期間變更位置時發生。
public:
virtual event ManipulationDeltaEventHandler ^ ManipulationDelta;
// Register
event_token ManipulationDelta(ManipulationDeltaEventHandler const& handler) const;
// Revoke with event_token
void ManipulationDelta(event_token const* cookie) const;
// Revoke with event_revoker
UIElement::ManipulationDelta_revoker ManipulationDelta(auto_revoke_t, ManipulationDeltaEventHandler const& handler) const;
public event ManipulationDeltaEventHandler ManipulationDelta;
function onManipulationDelta(eventArgs) { /* Your code */ }
uIElement.addEventListener("manipulationdelta", onManipulationDelta);
uIElement.removeEventListener("manipulationdelta", onManipulationDelta);
- or -
uIElement.onmanipulationdelta = onManipulationDelta;
Public Custom Event ManipulationDelta As ManipulationDeltaEventHandler
<uiElement ManipulationDelta="eventhandler"/>
事件類型
備註
關於自訂控制與互動體驗,請參見 GestureRecognitionr。
元素必須具有 ManipulationMode 值 None ,且非 或 System 是操作事件來源。 預設值 ManipulationMode 為 System,允許內建控制邏輯處理操作,但不允許應用程式程式碼處理操作事件。 如果你想處理操作,可以設定 ManipulationMode 為 All,或是特定的 ManipulationModes 值。 更多資訊請參見[ManipulationMode。
ManipulationDelta 是路由事件。 如果事件因未被處理而被允許冒泡到父元素,那麼即使 ManipulationMode 是 None 父元素或 System 父元素,事件仍可處理。 欲了解更多路由事件概念,請參閱 事件與路由事件總覽。
對於觸控動作,以及觸控動作結果的互動特定或操作事件,元素必須是點擊測試可見的,才能成為事件來源,並引發與動作相關聯的事件。 UIElement.Visibility 必須是 可見的。 衍生型別的其他特性也會影響命中測試的可見性。 如需詳細資訊,請參閱事件與路由事件概觀。
ManipulationDelta 支援即使事件資料標記 為已處理,也能將事件處理器附加到將被呼叫的路由上。 請參見 AddHandler。