.NET MAUI - Data templates
.NET Multi-platform App UI (.NET MAUI) data templates provide the ability to define the presentation of data on supported controls. A DataTemplateSelector
can be used to choose a DataTemplate
at runtime based on the value of a data-bound property. This enables multiple data templates to be applied to the same type of object, to choose their appearance at runtime.
This sample demonstrates creating a DataTemplate
to specify the appearance of data being displayed by a CollectionView
, and using a DataTemplateSelector
to select a DataTemplate
at runtime per item in the CollectionView
.
For more information about this sample, see .NET MAUI Data templates.