Click or drag to resize

DataTemplateAttribute Class

Attribute to apply to views to dynamically generate the DataTemplate that associates the view with it's view model.
Inheritance Hierarchy

Namespace:  TomsToolbox.Wpf.Composition.Mef
Assembly:  TomsToolbox.Wpf.Composition.Mef (in TomsToolbox.Wpf.Composition.Mef.dll)
Syntax
[MetadataAttributeAttribute]
[AttributeUsageAttribute(AttributeTargets.Class)]
public sealed class DataTemplateAttribute : ExportAttribute, 
	IDataTemplateMetadata

The DataTemplateAttribute type exposes the following members.

Constructors
  NameDescription
Public methodDataTemplateAttribute
Initializes a new instance of the DataTemplateAttribute class.
Top
Properties
  NameDescription
Public propertyDataType
Gets the type of the view model that this visual has a representation for.
Public propertyRole
Gets the role of this visual. If a role is set, a RoleBasedDataTemplateKey will be created for this view; else a simple DataTemplateKey is used.
Top
Extension Methods
See Also