RoutedEvent.RoutingStrategy 属性

定义

获取路由事件的路由策略。Gets the routing strategy of the routed event.

public:
 property System::Windows::RoutingStrategy RoutingStrategy { System::Windows::RoutingStrategy get(); };
public System.Windows.RoutingStrategy RoutingStrategy { get; }
member this.RoutingStrategy : System.Windows.RoutingStrategy
Public ReadOnly Property RoutingStrategy As RoutingStrategy

属性值

枚举值之一。One of the enumeration values. 默认值为枚举默认值 BubbleThe default is the enumeration default, Bubble.

注解

按照约定,隧道路由事件具有定义的名称前缀 "预览" 和关联的冒泡事件。By convention, tunneling routed events have the name prefix "Preview" and an associated bubbling event defined. 只会有一个隧道版本,而不是匹配的冒泡版本。It should be rare that there would be only a tunneling version and not a matching bubbling version. 有关详细信息,请参阅如何:创建自定义路由事件For more information, see How to: Create a Custom Routed Event.

此属性的值源自定义 RoutedEventRegisterRoutedEvent 方法。The value of this property originates from the RegisterRoutedEvent method that defines a RoutedEvent. 具体而言,RoutingStrategy 的值是传递给 RegisterRoutedEventroutingStrategy 参数值。Specifically, the value of RoutingStrategy is the routingStrategy parameter value that was passed to RegisterRoutedEvent.

适用于

另请参阅