AutoSuggestEdit.ItemTemplate Property
In This Article
Gets or sets a template that defines the presentation of items contained within the drop-down list. This is a dependency property.
Namespace: DevExpress.Xpf.Editors
Assembly: DevExpress.Xpf.Core.v24.2.dll
NuGet Package: DevExpress.Wpf.Core
#Declaration
public DataTemplate ItemTemplate { get; set; }
#Property Value
Type | Description |
---|---|
Data |
A Data |
#Remarks
You can apply different templates to editor’s drop-down items using a custom logic implemented in the ItemTemplateSelector.
#Example
<dxe:AutoSuggestEdit
TextMember="City"
DisplayMember="City"
QuerySubmitted="AutoSuggestEdit_QuerySubmitted">
<dxe:AutoSuggestEdit.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal" >
<TextBlock Text="City:" Width="30"/>
<TextBlock Text="{Binding City}" Width="100"/>
<TextBlock Text="Customer:" Width="60" HorizontalAlignment="Right"/>
<TextBlock Text="{Binding Name}" Width="120"/>
</StackPanel>
</DataTemplate>
</dxe:AutoSuggestEdit.ItemTemplate>
</dxe:AutoSuggestEdit>
See Also