ContentElement.AddToEventRoute(EventRoute, RoutedEventArgs) 方法

定義

針對目前的 EventRoute 事件處理常式集合,將處理常式加入至指定的 ContentElement

public:
 void AddToEventRoute(System::Windows::EventRoute ^ route, System::Windows::RoutedEventArgs ^ e);
public void AddToEventRoute (System.Windows.EventRoute route, System.Windows.RoutedEventArgs e);
member this.AddToEventRoute : System.Windows.EventRoute * System.Windows.RoutedEventArgs -> unit
Public Sub AddToEventRoute (route As EventRoute, e As RoutedEventArgs)

參數

route
EventRoute

加入處理常式的事件路由。

e
RoutedEventArgs

用於加入處理常式的事件資料。 這個方法會使用引數的 RoutedEvent 屬性來建立處理常式。

備註

不論它們是否實 IContentHost 作) ,將內容主機子項目的處理常式新增至主機 EventRoute ,都 (使用這個方法。

適用於