New to Telerik UI for WPF? Start a free 30-day trial

Contains extension methods for enumerating the children of an element.

Definition

Namespace:Telerik.Windows.Controls

Assembly:Telerik.Windows.Controls.dll

Syntax:

C#
public static class ChildrenOfTypeExtensions

Inheritance: objectChildrenOfTypeExtensions

Methods

Gets all child elements recursively from the visual tree by given type.

C#
public static IEnumerable<T> ChildrenOfType<T>(this DependencyObject element) where T : DependencyObject
Parameters:elementDependencyObjectReturns:

IEnumerable<T>

Finds child element of the specified type. Uses breadth-first search.

C#
public static T FindChildByType<T>(this DependencyObject element) where T : DependencyObject
Parameters:elementDependencyObject

The target DependencyObject which children will be traversed.

Returns:

T

The first child element that is of the specified type.