LogicalTree Class

Definition

Defines a collection of extensions methods for UI.

public static class LogicalTree
type LogicalTree = class
Public Module LogicalTree
Inheritance
LogicalTree

Methods

FindChild<T>(FrameworkElement)

Find first logical child control of a specified type.

FindChildByName(FrameworkElement, String)

Find logical child control using its name.

FindChildren<T>(FrameworkElement)

Find all logical child controls of the specified type.

FindParent<T>(FrameworkElement)

Find first logical parent control of a specified type.

FindParentByName(FrameworkElement, String)

Finds the logical parent element with the given name or returns null.

GetContentControl(FrameworkElement)

Retrieves the Content control of this element as defined by the ContentPropertyAttribute.

TryFindResource(FrameworkElement, Object)

Provides a WPF compatible version of TryFindResource to provide a static resource lookup. If the key is not found in the current element's resources, the logical tree is then searched element-by-element to look for the resource in each element's resources. If none of the elements contain the resource, the Application's resources are then searched. https://docs.microsoft.com/dotnet/api/system.windows.frameworkelement.tryfindresourcehttps://docs.microsoft.com/dotnet/desktop-wpf/fundamentals/xaml-resources-define#static-resource-lookup-behavior

Applies to