ControlExtensions.SelectedItemTemplate method (1 of 2)
Sets the template that presents the selected item in the header. Without it the header falls back to the item template, then to the item text.
public static ComboBox SelectedItemTemplate(this ComboBox comboBox, IDataTemplate template)| parameter | description |
|---|---|
| comboBox | Target combo box. |
| template | Selected item template. |
Return Value
Section titled “Return Value”The combo box for chaining.
Sets: ComboBox.SelectedItemTemplate
See Also
Section titled “See Also”- class ComboBox
- interface IDataTemplate
- class ControlExtensions
- namespace Aprillz.MewUI.Controls
ControlExtensions.SelectedItemTemplate<TItem> method (2 of 2)
Section titled “ControlExtensions.SelectedItemTemplate<TItem> method (2 of 2)”Sets the selected item template using delegate-based templating.
public static ComboBox SelectedItemTemplate<TItem>(this ComboBox comboBox, Func<TemplateContext, FrameworkElement> build, Action<FrameworkElement, TItem, int, TemplateContext> bind, Action<FrameworkElement, TItem, int, TemplateContext>? unbind = null)| parameter | description |
|---|---|
| TItem | Item type. |
| comboBox | Target combo box. |
| build | Template build callback. |
| bind | Template bind callback. |
| unbind | Optional template cleanup callback. |
Return Value
Section titled “Return Value”The combo box for chaining.
See Also
Section titled “See Also”- class ComboBox
- class TemplateContext
- class FrameworkElement
- class ControlExtensions
- namespace Aprillz.MewUI.Controls