PresentationSource.RootChanged Method (Visual, Visual)
.NET Framework 4.6 and 4.5
Provides notification that the root Visual has changed.
PresentationCore (in PresentationCore.dll)
protected void RootChanged(
Derived classes should call this method to indicate that their root Visual has changed.
Calling this method causes two object lifetime events to be raised on the specified root visuals, if and only if those root visuals are FrameworkElement derived classes.
The old root visual will raise the Unloaded event, and will process its tree of elements downward, broadcasting this event to each child element.
The new root visual will raise the Loaded event, and will process its tree of elements downward, broadcasting this event to each child element.
Return to top
Available since 3.0