语言

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,但在其他事件(如ManipulationInertiaStarting之前ManipulationDelta)触发。

元素必须具有除操作事件源以外的 NoneManipulationMode 值或System必须是操作事件源。 默认值ManipulationModeSystem为 ,它允许内置控制逻辑处理操作,但不允许应用代码处理操作事件。 如果要处理操作、设置为ManipulationModeAll特定 ManipulationModes 值或设置为特定 ManipulationModes 值。 有关详细信息,请参阅 ManipulationMode。

ManipulationStarted 是路由事件。 如果允许事件向上气泡到父元素,因为它未处理,则即使 ManipulationMode 是 None 父元素还是 System 父元素上的事件,也可以处理父元素上的事件。 有关路由事件概念的详细信息,请参阅 事件和路由事件概述。

对于触控操作以及特定于交互或操作的事件,元素必须在命中测试中可见才能成为事件源,并触发与操作关联的事件。 UIElement.Visibility 必须是 可见的。 派生类型的其他属性也会影响命中测试可见性。 有关详细信息,请参阅 事件和路由事件概述。

ManipulationStarted 支持将事件处理程序附加到将调用的路由的功能,即使事件的事件数据标记为 Handled 也是如此。 请参阅 AddHandler。

适用于

另请参阅