FrameworkElement.GetTemplateChild Method

Do not use. Use FindName instead.

Namespace: System.Windows
Assembly: PresentationFramework (in presentationframework.dll)

protected internal DependencyObject GetTemplateChild (
	string childName
protected DependencyObject GetTemplateChild (
	String childName
protected internal function GetTemplateChild (
	childName : String
) : DependencyObject
You cannot use methods in XAML.



Name of the child to find.

Return Value

The requested element. May be a null reference (Nothing in Visual Basic) if no element of the requested name exists.

FindName supplies the same function as this method. FindName is public instead of protected, and it uses correct name-scoping considerations that allow it to access the template within an element and find named items within it.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions