DataTemplate DataTemplate Class

Definition

A template for multiple bindings, commonly used by ListViews and Xamarin.Forms.MultiPages.

public class DataTemplate : Xamarin.Forms.ElementTemplate
type DataTemplate = class
    inherit ElementTemplate
Inheritance
Derived

Remarks

In XAML, application developers can nest markup inside a DataTemplate tag to create a View whose members are bound to the properties of data objects that are contained in a ItemsSource list.

Constructors

DataTemplate() DataTemplate()

For internal use only.

DataTemplate(Func<Object>) DataTemplate(Func<Object>)

Creates and initializes a new instance of the DataTemplate class.

DataTemplate(Type) DataTemplate(Type)

Creates a new DataTemplate for type type.

Properties

Bindings Bindings

Gets a dictionary of bindings, indexed by the bound properties.

IDataTemplate.LoadTemplate IDataTemplate.LoadTemplate

For internal use only.

(Inherited from ElementTemplate)
Values Values

Returns a dictionary of property values for this DataTemplate, indexed by property.

Methods

CreateContent() CreateContent()

Used by the XAML infrastructure to load data templates and set up the content of the resulting UI.

(Inherited from ElementTemplate)
SetBinding(BindableProperty, BindingBase) SetBinding(BindableProperty, BindingBase)

Sets the binding for property.

SetValue(BindableProperty, Object) SetValue(BindableProperty, Object)

Sets the value of property.

Extension Methods

CreateContent(DataTemplate, Object, BindableObject) CreateContent(DataTemplate, Object, BindableObject)

For internal use by the Xamarin.Forms platform.

SelectDataTemplate(DataTemplate, Object, BindableObject) SelectDataTemplate(DataTemplate, Object, BindableObject)

For internal use by the Xamarin.Forms platform.

SetBinding(DataTemplate, BindableProperty, String) SetBinding(DataTemplate, BindableProperty, String)

Binds the self object's targetProperty to a new Binding instance that was created with path.

LoadFromXaml<TXaml>(TXaml, String) LoadFromXaml<TXaml>(TXaml, String)

Returns an initialized view by loading the specified xaml.

LoadFromXaml<TXaml>(TXaml, Type) LoadFromXaml<TXaml>(TXaml, Type)

Returns a TXaml with the properties that are defined in the application manifest for callingType.

Applies to