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 的淺層複本 (Shallow Copy)。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)

適用於