Skip to content

ComboBox.SelectedItemTemplate property

Gets or sets the template that presents the selected item in the header; null falls back to ItemTemplate, and with neither set the header draws the item text.

public IDataTemplate? SelectedItemTemplate { get; set; }

The header keeps its own size: the built view is clipped to the text area and never grows the control, so a template larger than the header needs Width / MinWidth / Height / MinHeight on the ComboBox. The view is not hit-testable; clicks reach the ComboBox and open the drop-down.

Fluent: .SelectedItemTemplate(Func<TemplateContext, FrameworkElement>, Action<FrameworkElement, TItem, Int32, TemplateContext>, Action<FrameworkElement, TItem, Int32, TemplateContext>), .SelectedItemTemplate(IDataTemplate)