Share via


DataTemplate Constructors

Definition

Overloads

Name Description
DataTemplate()

Initializes a new instance of the DataTemplate class.

DataTemplate(Func<Object>)

Initializes a new instance with a factory function that creates template content.

DataTemplate(Type)

Initializes a new instance of the DataTemplate class with the specified type.

DataTemplate()

Source:
DataTemplate.cs
Source:
DataTemplate.cs
Source:
DataTemplate.cs
Source:
DataTemplate.cs

Initializes a new instance of the DataTemplate class.

public:
 DataTemplate();
public DataTemplate();
Public Sub New ()

Applies to

DataTemplate(Func<Object>)

Source:
DataTemplate.cs
Source:
DataTemplate.cs
Source:
DataTemplate.cs
Source:
DataTemplate.cs

Initializes a new instance with a factory function that creates template content.

public:
 DataTemplate(Func<System::Object ^> ^ loadTemplate);
public DataTemplate(Func<object> loadTemplate);
new Microsoft.Maui.Controls.DataTemplate : Func<obj> -> Microsoft.Maui.Controls.DataTemplate
Public Sub New (loadTemplate As Func(Of Object))

Parameters

loadTemplate
Func<Object>

A factory function that returns the template content.

Applies to

DataTemplate(Type)

Source:
DataTemplate.cs
Source:
DataTemplate.cs
Source:
DataTemplate.cs
Source:
DataTemplate.cs

Initializes a new instance of the DataTemplate class with the specified type.

public:
 DataTemplate(Type ^ type);
public DataTemplate(Type type);
new Microsoft.Maui.Controls.DataTemplate : Type -> Microsoft.Maui.Controls.DataTemplate
Public Sub New (type As Type)

Parameters

type
Type

The type of object to be created by the template.

Applies to