Version

GetTemplateChild<T>(FrameworkElement,DependencyObjectSearchCallback<T>) 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, _
   ByVal callback As Utilities.DependencyObjectSearchCallback(Of T) _
) As T

Parameters

templatedParent
The element whose template children are to be searched.
callback
A delegate that is called when an element of the appropriate type is encountered to determine if that is the element that should be returned or if the search should continue.

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