Customizing the appearance of data
Let us know how you feel about this
last updated: 2016-03
A DataTemplate is used to specify the appearance of data on supported controls, and typically binds to the data to be displayed.
Xamarin.Forms data templates provide the ability to define the presentation of data on supported controls. This article provides an introduction to data templates, examining why they are necessary.
Data templates can be created inline, or in a
ResourceDictionary. An inline template should be used if there's no need to reuse the data template elsewhere. Alternatively, a
DataTemplate can be defined as a control-level, page-level, or application-level resource. This article demonstrates both techniques.
DataTemplateSelector can be used to choose a
DataTemplate at runtime based on the value of a data-bound property. This enables multiple
DataTemplate instances to be applied to the same type of object in order to customize the appearance of select objects. This article demonstrates how to create and consume a