EventRoute EventRoute EventRoute EventRoute Class

定义

表示路由事件将遵循的路由的容器。Represents the container for the route to be followed by a routed event.

public ref class EventRoute sealed
public sealed class EventRoute
type EventRoute = class
Public NotInheritable Class EventRoute
继承
EventRouteEventRouteEventRouteEventRoute

注解

此类对应于有效RoutedEvent的, 它包含引用该事件的事件路由的目标对象和处理程序列表对的排序列表。This class corresponds to a valid RoutedEvent, and contains an ordered list of target object and handler list pairs that refer to the event route for that event. EventRoute支持向列表中添加新项, 还允许调用列表中的处理程序。EventRoute supports adding new entries to the list and also allows for the handlers in the list to be invoked.

添加Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF)事件处理程序的最常见操作不需要使用此类 (例如, 使用EventManager方法来添加类处理或查询事件的现有处理程序)。Most normal operations for adding handlers for Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF) events do not require working with this class (for instance, use EventManager methods to add class handling, or query for existing handlers of an event). 此类主要用于在元素具有对子元素或父元素的特定知识时使用, 从而使你可以在默认计算的事件路由中添加元素或从中删除元素。This class is mainly for use when elements have particular knowledge about child elements or parent elements that make it practical to either add elements to or remove elements from the default calculated event route.

构造函数

EventRoute(RoutedEvent) EventRoute(RoutedEvent) EventRoute(RoutedEvent) EventRoute(RoutedEvent)

初始化 EventRoute 类的实例。Initializes an instance of the EventRoute class.

方法

Add(Object, Delegate, Boolean) Add(Object, Delegate, Boolean) Add(Object, Delegate, Boolean) Add(Object, Delegate, Boolean)

将指定目标的指定处理程序添加到路由。Adds the specified handler for the specified target to the route.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

获取当前实例的 TypeGets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(Inherited from Object)
PeekBranchNode() PeekBranchNode() PeekBranchNode() PeekBranchNode()

返回两个逻辑树分叉处的事件路由堆栈上的最顶层元素。Returns the top-most element on the event route stack at which two logical trees diverge.

PeekBranchSource() PeekBranchSource() PeekBranchSource() PeekBranchSource()

返回两个逻辑树分叉处的事件路由堆栈上最顶层元素的源。Returns the source for the top-most element on the event route stack at which two logical trees diverge.

PopBranchNode() PopBranchNode() PopBranchNode() PopBranchNode()

返回两个逻辑树分叉处的事件路由堆栈上的最顶层节点。Returns the top-most node on the event route stack at which two logical trees diverge.

PushBranchNode(Object, Object) PushBranchNode(Object, Object) PushBranchNode(Object, Object) PushBranchNode(Object, Object)

向两个逻辑树分叉处的事件路由堆栈添加最顶层节点。Adds the top-most node to the event route stack at which two logical trees diverge.

ToString() ToString() ToString() ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(Inherited from Object)

适用于