UIElement.AddToEventRoute(EventRoute, RoutedEventArgs) 메서드

정의

현재 EventRoute 이벤트 처리기 컬렉션에 대해 지정된 UIElement에 처리기를 추가합니다.

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에 대한 처리기를 추가하는 데 사용할 수 있습니다. 일반적으로 처리기는 완료된 논리 트리에 UIElement있는 모든 요소에 대해 자동으로 추가되기 때문에 필요하지 않습니다. 그러나 템플릿이 적용된 트리에 혼합되어 있는 경우에 ContentElement UIElement 템플릿에서 온 중간 요소를 경로에 추가해야 합니다. 둘 다 ContentElementUIElement 메서드의 버전을 지원합니다.

적용 대상