Show / Hide Table of Contents

Class DataTemplate

Describes the visual structure of a data object.

Inheritance
System.Object
DependencyObject
FrameworkTemplate
DataTemplate
TimePickerPopupTemplate
HierarchicalDataTemplate
Inherited Members
FrameworkTemplate.Seal()
FrameworkTemplate.IsSealed()
DependencyObject.GetValue(DependencyProperty)
DependencyObject.SetCurrentValue(DependencyProperty, Object)
DependencyObject.ReadLocalValue(DependencyProperty)
DependencyObject.SetValue(DependencyProperty, Object)
DependencyObject.SetValue(DependencyPropertyKey, Object)
DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs)
DependencyObject.CoerceValue(DependencyProperty)
DependencyObject.Dispatcher
DependencyObject.INTERNAL_OnAttachedToVisualTree()
DependencyObject.INTERNAL_OnDetachedFromVisualTree()
DependencyObject.ClearValue(DependencyProperty)
DependencyObject.ClearValue(DependencyPropertyKey)
DependencyObject.CheckAccess()
DependencyObject.GetAnimationBaseValue(DependencyProperty)
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, IDependencyObject

Constructors

| Improve this Doc View Source

DataTemplate()

Initializes a new instance of the DataTemplate class without initializing the DataType property.

Declaration
public DataTemplate()

Properties

| Improve this Doc View Source

DataType

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 Source

LoadContent()

Creates the UIElement objects in the DataTemplate.

Declaration
public DependencyObject LoadContent()
Returns
Type Description
DependencyObject

The root UIElement of the DataTemplate.

Extension Methods

DependencyObjectHelper.GetSelfAndAncestors(DependencyObject)
VisualTreeExtensions.GetVisualAncestors(DependencyObject)
VisualTreeExtensions.GetVisualAncestorsAndSelf(DependencyObject)
VisualTreeExtensions.GetVisualChildren(DependencyObject)
VisualTreeExtensions.GetVisualChildrenAndSelf(DependencyObject)
VisualTreeExtensions.GetVisualDescendants(DependencyObject)
VisualTreeExtensions.GetVisualDescendantsAndSelf(DependencyObject)
VisualTreeExtensions.GetVisualSiblings(DependencyObject)
VisualTreeExtensions.GetVisualSiblingsAndSelf(DependencyObject)
  • Improve this Doc
  • View Source