VisualTreeExtensions

The VisualTreeExtensions provides a collection of extensions methods for UI.

Example


    // Find descendant control using its name
    var control = uiElement.FindDescendantByName("mytextbox");

    // Find first descendant control of a specified type
    control = uiElement.FindDescendant<ListView>();

    // Find first ascendant control of a specified type
    control = uiElement.FindAscendant<ListView>();

    // Find first visual ascendant control of a specified type
    control = uiElement.FindVisualAscendant<ScrollViewer>();

Requirements (Windows 10 Device Family)

Device family Universal, 10.0.10586.0 or higher
Namespace Microsoft.Toolkit.Uwp

API