Skip to content

ControlExtensions.ItemTemplate method (1 of 9)

Sets the item template for the drop-down list.

public static ComboBox ItemTemplate(this ComboBox comboBox, IDataTemplate template)
parameter description
comboBox Target combo box.
template Item template.

The combo box for chaining.

Sets: ComboBox.ItemTemplate, ListBox.ItemTemplate, SegmentedBase.ItemTemplate, TreeView.ItemTemplate


ControlExtensions.ItemTemplate method (2 of 9)

Section titled “ControlExtensions.ItemTemplate method (2 of 9)”

Sets the item template.

public static ListBox ItemTemplate(this ListBox listBox, IDataTemplate template)
parameter description
listBox Target list box.
template Item template.

The list box for chaining.


ControlExtensions.ItemTemplate method (3 of 9)

Section titled “ControlExtensions.ItemTemplate method (3 of 9)”

Sets the node template.

public static TreeView ItemTemplate(this TreeView treeView, IDataTemplate template)
parameter description
treeView Target tree view.
template Node template.

The tree view for chaining.


ControlExtensions.ItemTemplate<TSelf> method (4 of 9)

Section titled “ControlExtensions.ItemTemplate<TSelf> method (4 of 9)”

Sets the segment template.

public static TSelf ItemTemplate<TSelf>(this TSelf control, IDataTemplate template)
where TSelf : SegmentedBase
parameter description
control Target segmented control.
template Segment template.

The control for chaining.


ControlExtensions.ItemTemplate<TItem> method (5 of 9)

Section titled “ControlExtensions.ItemTemplate<TItem> method (5 of 9)”

Sets the segment template for a ButtonGroup using delegate-based templating.

public static ButtonGroup ItemTemplate<TItem>(this ButtonGroup control,
Func<TemplateContext, FrameworkElement> build,
Action<FrameworkElement, TItem, int, TemplateContext> bind,
Action<FrameworkElement, TItem, int, TemplateContext>? unbind = null)

ControlExtensions.ItemTemplate<TItem> method (6 of 9)

Section titled “ControlExtensions.ItemTemplate<TItem> method (6 of 9)”

Sets the item template using delegate-based templating.

public static ComboBox ItemTemplate<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.

The combo box for chaining.


ControlExtensions.ItemTemplate<TItem> method (7 of 9)

Section titled “ControlExtensions.ItemTemplate<TItem> method (7 of 9)”

Sets the item template using delegate-based templating.

public static ListBox ItemTemplate<TItem>(this ListBox listBox,
Func<TemplateContext, FrameworkElement> build,
Action<FrameworkElement, TItem, int, TemplateContext> bind,
Action<FrameworkElement, TItem, int, TemplateContext>? unbind = null)
parameter description
TItem Item type.
listBox Target list box.
build Template build callback.
bind Template bind callback.
unbind Optional template cleanup callback.

The list box for chaining.


ControlExtensions.ItemTemplate<TItem> method (8 of 9)

Section titled “ControlExtensions.ItemTemplate<TItem> method (8 of 9)”

Sets the segment template using delegate-based templating.

public static SegmentedControl ItemTemplate<TItem>(this SegmentedControl control,
Func<TemplateContext, FrameworkElement> build,
Action<FrameworkElement, TItem, int, TemplateContext> bind,
Action<FrameworkElement, TItem, int, TemplateContext>? unbind = null)
parameter description
TItem Item type.
control Target segmented control.
build Template build callback.
bind Template bind callback.
unbind Optional template cleanup callback.

The control for chaining.


ControlExtensions.ItemTemplate<TItem> method (9 of 9)

Section titled “ControlExtensions.ItemTemplate<TItem> method (9 of 9)”

Sets the node template using delegate-based templating.

public static TreeView ItemTemplate<TItem>(this TreeView treeView,
Func<TemplateContext, FrameworkElement> build,
Action<FrameworkElement, TItem, int, TemplateContext> bind,
Action<FrameworkElement, TItem, int, TemplateContext>? unbind = null)
parameter description
TItem Item type.
treeView Target tree view.
build Template build callback.
bind Template bind callback.
unbind Optional template cleanup callback.

The tree view for chaining.