Version

VisualDescendantsOfType<T> Method

Gets all the visual descendants of a certain type under the given parent FrameworkElement.
Syntax
'Declaration
 
Public Shared Function VisualDescendantsOfType(Of T As FrameworkElement)( _
   ByVal ele As FrameworkElement _
) As IEnumerable(Of T)
public static IEnumerable<T> VisualDescendantsOfType<T>( 
   FrameworkElement ele
)
where T: FrameworkElement

Parameters

ele
The parent FrameworkElement to search under.

Type Parameters

T
The Type of visual descendants to search for.

Return Value

An enumerable list of all visual descendants of the given type under the given parent FrameworkElement.
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also