RoutingStrategy 列舉

定義

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

public enum class RoutingStrategy
public enum RoutingStrategy
type RoutingStrategy = 
Public Enum RoutingStrategy
繼承
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

路由事件不會在項目樹狀中路由傳送,但會支援類別處理、EventTriggerEventSetter 等路由事件功能。The 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.

適用於