Xamarin.Forms Guides | Samples

Xamarin.Forms.DataTemplate Class

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

See Also: DataTemplate

Syntax

public class DataTemplate : ElementTemplate

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 MultiPage`1.ItemsSource list.

Requirements

Namespace: Xamarin.Forms
Assembly: Xamarin.Forms.Core (in Xamarin.Forms.Core.dll)
Assembly Versions: 1.0.0.0, 1.1.0.0, 1.2.0.0, 1.3.0.0, 1.3.3.0, 1.4.0.0, 1.5.0.0, 2.0.0.0

The members of Xamarin.Forms.DataTemplate are listed below.

See Also: ElementTemplate

Public Constructors

For internal use only.
Creates and initializes a new instance of the DataTemplate class.
Creates a new DataTemplate for type type.

Public Properties

[read-only]
BindingsIDictionary<BindableProperty, BindingBase>. Gets a dictionary of bindings, indexed by the bound properties.
[read-only]
ValuesIDictionary<BindableProperty, object>. Returns a dictionary of property values for this DataTemplate, indexed by property.

Public Methods

CreateContent() : Object
Loads the template for the type that is represented by this DataTemplate and sets all of the bindings and values.
SetBinding(BindableProperty, BindingBase)
Sets the binding for property.
SetValue(BindableProperty, Object)
Sets the value of property.

Explicitly Implemented Interface Members