UIElement.OnVisualParentChanged Method (DependencyObject)
Invoked when the parent element of this UIElement reports a change to its underlying visual parent.
Assembly: PresentationCore (in PresentationCore.dll)
Notes to Inheritors:
If you override this method, always call the base implementation. The default base implementation performs some internal maintenance of reverse-inherited property state. Failing to call the base implementation will invalidate this state.
Available since 3.0