EventRoute 類別

定義

表示接在路由事件後面之路由的容器。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
繼承
EventRoute

備註

這個類別會對應到有效的 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 類別的執行個體。Initializes an instance of the EventRoute class.

方法

Add(Object, Delegate, Boolean)

將指定目標的指定處理常式加入至路由中。Adds the specified handler for the specified target to the route.

Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(繼承來源 Object)
GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(繼承來源 Object)
GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。Creates a shallow copy of the current Object.

(繼承來源 Object)
PeekBranchNode()

傳回事件路由堆疊中,開始分枝成兩個邏輯樹狀結構的最上層項目。Returns the top-most element on the event route stack at which two logical trees diverge.

PeekBranchSource()

傳回事件路由堆疊中,開始分枝成兩個邏輯樹狀結構的最上層項目的來源。Returns the source for the top-most element on the event route stack at which two logical trees diverge.

PopBranchNode()

傳回事件路由堆疊中,開始分枝成兩個邏輯樹狀結構的最上層節點。Returns the top-most node on the event route stack at which two logical trees diverge.

PushBranchNode(Object, Object)

在事件路由堆疊中,新增開始分枝成兩個邏輯樹狀結構的最上層項目。Adds the top-most node to the event route stack at which two logical trees diverge.

ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(繼承來源 Object)

適用於