Class DataTemplate
Describes the visual structure of a data object.
Inheritance
System.Object
DataTemplate
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: System.Windows
Assembly: OpenSilver.dll
Syntax
public class DataTemplate : FrameworkTemplate
Constructors
| Improve this Doc View SourceDataTemplate()
Initializes a new instance of the DataTemplate class without initializing the DataType property.
Declaration
public DataTemplate()
Properties
| Improve this Doc View SourceDataType
Gets or sets the type for which this DataTemplate is intended.
Declaration
public Type DataType { get; set; }
Property Value
Type | Description |
---|---|
System.Type | The type of object to which this template is applied. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | When setting this property, the specified value is not of type System.Type. |
Methods
| Improve this Doc View SourceLoadContent()
Creates the UIElement objects in the DataTemplate.
Declaration
public DependencyObject LoadContent()
Returns
Type | Description |
---|---|
DependencyObject | The root UIElement of the DataTemplate. |