Version

GetTemplateChild<T>(FrameworkElement) Method

Searches an element for an templated child of the specified type.
Syntax
'Declaration
 
Public Overloads Shared Function GetTemplateChild(Of T As DependencyObject)( _
   ByVal templatedParent As FrameworkElement _
) As T
public static T GetTemplateChild<T>( 
   FrameworkElement templatedParent
)
where T: DependencyObject

Parameters

templatedParent
The element whose template children are to be searched.

Type Parameters

T
The type of child to return.

Return Value

An element of the specified type or null.
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