PresentationSource.RootChanged(Visual, Visual) 메서드

정의

루트 Visual이 변경된 알림을 제공합니다.

protected:
 void RootChanged(System::Windows::Media::Visual ^ oldRoot, System::Windows::Media::Visual ^ newRoot);
[System.Security.SecurityCritical]
[System.Security.SecurityTreatAsSafe]
protected void RootChanged (System.Windows.Media.Visual oldRoot, System.Windows.Media.Visual newRoot);
protected void RootChanged (System.Windows.Media.Visual oldRoot, System.Windows.Media.Visual newRoot);
[<System.Security.SecurityCritical>]
[<System.Security.SecurityTreatAsSafe>]
member this.RootChanged : System.Windows.Media.Visual * System.Windows.Media.Visual -> unit
member this.RootChanged : System.Windows.Media.Visual * System.Windows.Media.Visual -> unit
Protected Sub RootChanged (oldRoot As Visual, newRoot As Visual)

매개 변수

oldRoot
Visual

이전 루트 Visual입니다.

newRoot
Visual

새 루트 Visual입니다.

특성

설명

파생 클래스는 루트가 변경되었음을 나타내기 위해 이 메서드를 Visual 호출해야 합니다.

이 메서드를 호출하면 해당 루트 시각적 개체가 파생 클래스인 경우에만 지정된 루트 시각적 FrameworkElement 개체에서 두 개의 개체 수명 이벤트가 발생합니다.

  • 이전 루트 시각적 개체는 이벤트를 발생 Unloaded 시키고 요소 트리를 아래쪽으로 처리하여 이 이벤트를 각 자식 요소에 브로드캐스트합니다.

  • 새 루트 시각적 개체는 이벤트를 발생 Loaded 시키고 요소 트리를 아래쪽으로 처리하여 이 이벤트를 각 자식 요소에 브로드캐스트합니다.

적용 대상