RoutingStrategy 枚举


指示路由事件的路由策略。Indicates the routing strategy of a routed event.

public enum class RoutingStrategy
public enum RoutingStrategy
type RoutingStrategy = 
Public Enum RoutingStrategy


Bubble 1

路由事件使用冒泡策略,以便事件实例通过树向上路由(从事件元素到根)。The routed event uses a bubbling strategy, where the event instance routes upwards through the tree, from event source to root.

Direct 2

路由事件不通过元素树路由,但支持其他路由的事件功能,例如类处理 EventTriggerEventSetterThe routed event does not route through an element tree, but does support other routed event capabilities such as class handling, EventTrigger or EventSetter.

Tunnel 0

路由事件使用隧道策略,以便事件实例通过树向下路由(从根到源元素)。The routed event uses a tunneling strategy, where the event instance routes downwards through the tree, from root to source element.


每个路由事件的路由策略必须只是这些值中的一个。Routing strategy for each routed event must be only one of these values. 但是, 输入事件在基类上通常是成对的, 其中一个事件是冒泡版本, 另一个事件是隧道版本。However, input events often exist in pairs on base classes, where one event is the bubbling version and one event is the tunneling version. 对于唯一的输入事件, 隧道和冒泡版本具有共享参数, 并连续引发以响应引发事件的输入设备条件。For input events uniquely, the tunneling and bubbling versions have shared arguments and are raised in succession in response to the input device condition that raises the events.