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)

適用於