ControlExtensions.Items method (1 of 14)
Sets ItemsSource to a view over the strings.
public static ComboBox Items(this ComboBox comboBox, params string[] items)| parameter | description |
|---|---|
| comboBox | Target combo box. |
| items | Item strings. |
Return Value
Section titled “Return Value”The combo box for chaining.
Sets: ContextMenu.Items
See Also
Section titled “See Also”- class ComboBox
- class ControlExtensions
- namespace Aprillz.MewUI.Controls
ControlExtensions.Items method (2 of 14)
Section titled “ControlExtensions.Items method (2 of 14)”Replaces the menu items.
public static ContextMenu Items(this ContextMenu menu, params MenuEntry[] items)| parameter | description |
|---|---|
| menu | Target context menu. |
| items | Menu items. |
Return Value
Section titled “Return Value”The context menu for chaining.
See Also
Section titled “See Also”- class ContextMenu
- class MenuEntry
- class ControlExtensions
- namespace Aprillz.MewUI.Controls
ControlExtensions.Items method (3 of 14)
Section titled “ControlExtensions.Items method (3 of 14)”Sets ItemsSource to a view over the strings.
public static ItemsControl Items(this ItemsControl itemsControl, params string[] items)| parameter | description |
|---|---|
| itemsControl | Target items control. |
| items | Item strings. |
Return Value
Section titled “Return Value”The items control for chaining.
See Also
Section titled “See Also”- class ItemsControl
- class ControlExtensions
- namespace Aprillz.MewUI.Controls
ControlExtensions.Items method (4 of 14)
Section titled “ControlExtensions.Items method (4 of 14)”Sets ItemsSource to a view over the strings.
public static ListBox Items(this ListBox listBox, params string[] items)| parameter | description |
|---|---|
| listBox | Target list box. |
| items | Item strings. |
Return Value
Section titled “Return Value”The list box for chaining.
See Also
Section titled “See Also”- class ListBox
- class ControlExtensions
- namespace Aprillz.MewUI.Controls
ControlExtensions.Items<TSelf> method (5 of 14)
Section titled “ControlExtensions.Items<TSelf> method (5 of 14)”Sets ItemsSource to a view over the strings, one segment each.
public static TSelf Items<TSelf>(this TSelf control, params string[] items) where TSelf : SegmentedBase| parameter | description |
|---|---|
| control | Target segmented control. |
| items | Segment labels. |
Return Value
Section titled “Return Value”The control for chaining.
See Also
Section titled “See Also”- class SegmentedBase
- class ControlExtensions
- namespace Aprillz.MewUI.Controls
ControlExtensions.Items<T> method (6 of 14)
Section titled “ControlExtensions.Items<T> method (6 of 14)”Sets ItemsSource to a view over the items, with an optional text selector.
public static ItemsControl Items<T>(this ItemsControl itemsControl, IReadOnlyList<T> items, Func<T, string>? textSelector = null)| parameter | description |
|---|---|
| T | Item type. |
| itemsControl | Target items control. |
| items | Items collection. |
| textSelector | Optional text of an item; without one the item’s ToString() is used. |
Return Value
Section titled “Return Value”The items control for chaining.
See Also
Section titled “See Also”- class ItemsControl
- class ControlExtensions
- namespace Aprillz.MewUI.Controls
ControlExtensions.Items<T> method (7 of 14)
Section titled “ControlExtensions.Items<T> method (7 of 14)”Sets ItemsSource to a view over the items, with an optional text selector.
public static ComboBox Items<T>(this ComboBox comboBox, IReadOnlyList<T> items, Func<T, string>? textSelector = null, Func<T, object?>? keySelector = null)| parameter | description |
|---|---|
| T | Item type. |
| comboBox | Target combo box. |
| items | Items collection. |
| textSelector | Optional text of an item; without one the item’s ToString() is used. |
| keySelector | Optional key selector to stabilize selection when items change. |
Return Value
Section titled “Return Value”The combo box for chaining.
See Also
Section titled “See Also”- class ComboBox
- class ControlExtensions
- namespace Aprillz.MewUI.Controls
ControlExtensions.Items<T> method (8 of 14)
Section titled “ControlExtensions.Items<T> method (8 of 14)”Sets ItemsSource to a view over the items, with an optional text selector.
public static ListBox Items<T>(this ListBox listBox, IReadOnlyList<T> items, Func<T, string>? textSelector = null, Func<T, object?>? keySelector = null)| parameter | description |
|---|---|
| T | Item type. |
| listBox | Target list box. |
| items | Items collection. |
| textSelector | Optional text of an item; without one the item’s ToString() is used. |
| keySelector | Optional key selector to stabilize selection when items change. |
Return Value
Section titled “Return Value”The list box for chaining.
See Also
Section titled “See Also”- class ListBox
- class ControlExtensions
- namespace Aprillz.MewUI.Controls
ControlExtensions.Items<T> method (9 of 14)
Section titled “ControlExtensions.Items<T> method (9 of 14)”Binds items using the default text template; without a text selector an item shows its ToString().
public static NavigationList Items<T>(this NavigationList control, IReadOnlyList<T> items, Func<T, string>? textSelector = null, Func<T, NavigationItemKind>? kind = null, Func<T, object?>? keySelector = null)See Also
Section titled “See Also”- class NavigationList
- enum NavigationItemKind
- class ControlExtensions
- namespace Aprillz.MewUI.Controls
ControlExtensions.Items<T> method (10 of 14)
Section titled “ControlExtensions.Items<T> method (10 of 14)”Sets ItemsSource and KindSelector from the items and the selectors, keeping the default text template; without a text selector an item shows its ToString().
public static NavigationList Items<T>(this NavigationList control, IReadOnlyList<T> items, Func<TemplateContext, FrameworkElement> build, Action<FrameworkElement, T, int, TemplateContext> bind, Func<T, NavigationItemKind>? kind = null, Func<T, object?>? keySelector = null)Remarks
Section titled “Remarks”Generics are inferred once from items; kind and key are selectors, not chained generic calls.
See Also
Section titled “See Also”- class NavigationList
- class TemplateContext
- class FrameworkElement
- enum NavigationItemKind
- class ControlExtensions
- namespace Aprillz.MewUI.Controls
ControlExtensions.Items<T> method (11 of 14)
Section titled “ControlExtensions.Items<T> method (11 of 14)”Sets a hierarchical items source using a children selector.
public static TreeView Items<T>(this TreeView treeView, IReadOnlyList<T> roots, Func<T, IReadOnlyList<T>> childrenSelector, Func<T, string>? textSelector = null, Func<T, object?>? keySelector = null, Func<T, bool>? isExpandableSelector = null)| parameter | description |
|---|---|
| treeView | Target tree view. |
| roots | Root items collection. |
| childrenSelector | Selector for child collection. |
| textSelector | Optional text selector for the default template. |
| keySelector | Optional key selector for selection/state stability. |
| isExpandableSelector | Optional selector that determines whether an item displays an expand indicator independently of its currently loaded child count. |
Return Value
Section titled “Return Value”The tree view for chaining.
See Also
Section titled “See Also”- class TreeView
- class ControlExtensions
- namespace Aprillz.MewUI.Controls
ControlExtensions.Items<T> method (12 of 14)
Section titled “ControlExtensions.Items<T> method (12 of 14)”Sets the pane list’s items, template and ContentSelector from the items and the selectors, with arbitrary Element icons; a returned instance cannot be shared by rows at the same time, and text is hidden when the pane is compact.
public static NavigationView Items<T>(this NavigationView view, IReadOnlyList<T> items, Func<T, string>? textSelector, Func<T, Element?> icon, Func<T, Element?>? content = null, Func<T, NavigationItemKind>? kind = null, Func<T, object?>? keySelector = null)See Also
Section titled “See Also”- class NavigationView
- class Element
- enum NavigationItemKind
- class ControlExtensions
- namespace Aprillz.MewUI.Controls
ControlExtensions.Items<T> method (13 of 14)
Section titled “ControlExtensions.Items<T> method (13 of 14)”Sets the pane list’s items, template and ContentSelector from the items and the selectors, with optional PathGeometry icons; without a text selector an item’s label is its ToString().
public static NavigationView Items<T>(this NavigationView view, IReadOnlyList<T> items, Func<T, string>? textSelector = null, Func<T, PathGeometry?>? icon = null, Func<T, Element?>? content = null, Func<T, NavigationItemKind>? kind = null, Func<T, object?>? keySelector = null)See Also
Section titled “See Also”- class NavigationView
- class PathGeometry
- class Element
- enum NavigationItemKind
- class ControlExtensions
- namespace Aprillz.MewUI.Controls
ControlExtensions.Items<TSelf,T> method (14 of 14)
Section titled “ControlExtensions.Items<TSelf,T> method (14 of 14)”Sets ItemsSource to a view over the items, one segment each, with an optional text selector.
public static TSelf Items<TSelf, T>(this TSelf control, IReadOnlyList<T> items, Func<T, string>? textSelector = null, Func<T, object?>? keySelector = null) where TSelf : SegmentedBase| parameter | description |
|---|---|
| TSelf | Control type. |
| T | Item type. |
| control | Target segmented control. |
| items | Items collection. |
| textSelector | Optional text of an item; without one the item’s ToString() is used. |
| keySelector | Optional key selector to stabilize selection when items change. |
Return Value
Section titled “Return Value”The control for chaining.
See Also
Section titled “See Also”- class SegmentedBase
- class ControlExtensions
- namespace Aprillz.MewUI.Controls