Xamarin.Forms Guides | Samples

Xamarin.Forms.DataTemplate Class

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

See Also: DataTemplate


public class DataTemplate : ElementTemplate


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.


Namespace: Xamarin.Forms
Assembly: Xamarin.Forms.Core (in Xamarin.Forms.Core.dll)
Assembly Versions:,,,,,,,

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

BindingsIDictionary<BindableProperty, BindingBase>. Gets a dictionary of bindings, indexed by the bound properties.
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