ItemTemplate Property
Gets or sets the DataTemplate used to display each item in the drop-down portion of the control.
Definition
Namespace: Avalonia.Controls
Assembly: Avalonia.Controls (in Avalonia.Controls.dll)
- C#
- VB
- F#
public IDataTemplate ItemTemplate { get; set; }
Public Property ItemTemplate As IDataTemplate
Get
Set
member ItemTemplate : IDataTemplate with get, set
Property Value
IDataTemplate
The DataTemplate used to display each item in the drop-down. The default is null.
Remarks
You use the ItemTemplate property to specify the visualization of the data objects in the drop-down portion of the AutoCompleteBox control. If your AutoCompleteBox is bound to a collection and you do not provide specific display instructions by using a DataTemplate, the resulting UI of each item is a string representation of each object in the underlying collection.