Gets the template child and checks whether a required child exists and is of the correct type.

Namespace: FirstFloor.Documents.Controls
Assembly: FirstFloor.Documents.Controls (in FirstFloor.Documents.Controls.dll) Version: 2.5.0.0 (2.5.1.0)

Syntax

C#
protected T GetTemplateChild<T>(
	string childName,
	bool required
)
where T : class
Visual Basic
Protected Function GetTemplateChild(Of T As Class) ( _
	childName As String, _
	required As Boolean _
) As T
Visual C++
protected:
generic<typename T>
where T : ref class
T GetTemplateChild(
	String^ childName, 
	bool required
)

Parameters

childName
Type: System..::..String
Name of the child.
required
Type: System..::..Boolean
if set to true [required].

Type Parameters

T
Specifies the type of the template child.

Return Value

The typed template child.

See Also