Windows apps
Collapse the table of content
Expand the table of content
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

DataTemplate Constructor (Object)


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Initializes a new instance of the DataTemplate class with the specified DataType property.

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

public DataTemplate(
	object dataType


Type: System.Object

If the template is intended for object data, this is the Type name of the data object.

To refer to the Type name of the class, use the x:Type Markup Extension. If the template is intended for XML data, this is the string that represents the tag name of the data.

.NET Framework
Available since 3.0
Available since 5.0
Return to top
© 2017 Microsoft