VisualTreeHelper.DisconnectChildrenRecursive method

Applies to Windows and Windows Phone

Explicitly removes all references from a target UIElement, with the goal of cleaning up reference cycles.

Syntax


public static void DisconnectChildrenRecursive(
  UIElement element
)

Parameters

element

Type: UIElement

The target object to disconnect children and remove references from.

Remarks

This method is not intended for typical app or user code scenarios. Instead, it is intended for scenarios where a visual tree is hosted by some other application, such as a designer or code analysis tool. In most cases the scenario is that the visual tree is being cleared because it is about to be rebuilt based on saved information plus changes.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Xaml.Media
Windows::UI::Xaml::Media [C++]

Metadata

Windows.winmd

See also

VisualTreeHelper

 

 

Show:
© 2014 Microsoft