ControlExtensions.PrepareContainer<T> method (1 of 8)
Configures each ButtonGroup segment container after its content is bound. Use it to assign Command, subscribe to Click, or configure IsCheckable / IsChecked (independent toggle), enabled state, or tooltip.
public static ButtonGroup PrepareContainer<T>(this ButtonGroup control, Action<SegmentButton, T, int> prepare)See Also
Section titled “See Also”- class ButtonGroup
- class SegmentButton
- class ControlExtensions
- namespace Aprillz.MewUI.Controls
ControlExtensions.PrepareContainer<T> method (2 of 8)
Section titled “ControlExtensions.PrepareContainer<T> method (2 of 8)”Configures the container of each drop-down item once its content is bound, so behavior can be attached to the whole drop-down item rather than to the template.
public static ComboBox PrepareContainer<T>(this ComboBox comboBox, PrepareContainerHandler<ItemContainer, T> prepare)| parameter | description |
|---|---|
| T | Item type. |
Remarks
Section titled “Remarks”The callback runs on every bind, which includes scrolling one back into view, so keep it cheap. Register event subscriptions through the supplied context and they are removed before the next item is bound; properties assigned directly are reset by the framework instead.
See Also
Section titled “See Also”- class ComboBox
- delegate PrepareContainerHandler<TContainer,TItem>
- class ItemContainer
- class ControlExtensions
- namespace Aprillz.MewUI.Controls
ControlExtensions.PrepareContainer<T> method (3 of 8)
Section titled “ControlExtensions.PrepareContainer<T> method (3 of 8)”Configures each row once its cells are bound, so behavior can be attached to the whole row instead of being repeated in every cell template. The row is the container the grid already realizes, so no extra element is created.
public static GridView PrepareContainer<T>(this GridView grid, PrepareContainerHandler<GridViewRow, T> prepare)| parameter | description |
|---|---|
| T | Item type. |
| grid | Target grid view. |
| prepare | Row configuration callback. |
Return Value
Section titled “Return Value”The grid view for chaining.
Remarks
Section titled “Remarks”The callback runs on every bind, which includes scrolling a row back into view, so keep it cheap. Register event subscriptions through the supplied context and they are removed before the next item is bound; properties assigned directly are reset by the framework instead.
See Also
Section titled “See Also”- class GridView
- delegate PrepareContainerHandler<TContainer,TItem>
- class GridViewRow
- class ControlExtensions
- namespace Aprillz.MewUI.Controls
ControlExtensions.PrepareContainer<T> method (4 of 8)
Section titled “ControlExtensions.PrepareContainer<T> method (4 of 8)”Configures the container of each item once its content is bound. The container is the ItemContainer the items control places around every item.
public static ItemsControl PrepareContainer<T>(this ItemsControl itemsControl, PrepareContainerHandler<ItemContainer, T> prepare)| parameter | description |
|---|---|
| T | Item type. |
| itemsControl | Target items control. |
| prepare | Container configuration callback. |
Return Value
Section titled “Return Value”The items control for chaining.
See Also
Section titled “See Also”- class ItemsControl
- delegate PrepareContainerHandler<TContainer,TItem>
- class ItemContainer
- class ControlExtensions
- namespace Aprillz.MewUI.Controls
ControlExtensions.PrepareContainer<T> method (5 of 8)
Section titled “ControlExtensions.PrepareContainer<T> method (5 of 8)”Configures the container of each item once its content is bound, so behavior can be attached to the whole item rather than to the template. The container is the ItemContainer the list box places around every item.
public static ListBox PrepareContainer<T>(this ListBox listBox, PrepareContainerHandler<ItemContainer, T> prepare)| parameter | description |
|---|---|
| T | Item type. |
| listBox | Target list box. |
| prepare | Container configuration callback. |
Return Value
Section titled “Return Value”The list box for chaining.
Remarks
Section titled “Remarks”The callback runs on every bind, which includes scrolling an item back into view, so keep it cheap. Register event subscriptions through the supplied context and they are removed before the next item is bound; properties assigned directly are reset by the framework instead.
See Also
Section titled “See Also”- class ListBox
- delegate PrepareContainerHandler<TContainer,TItem>
- class ItemContainer
- class ControlExtensions
- namespace Aprillz.MewUI.Controls
ControlExtensions.PrepareContainer<T> method (6 of 8)
Section titled “ControlExtensions.PrepareContainer<T> method (6 of 8)”Configures the container of each row once its content is bound, so behavior can be attached to the whole row rather than to the template.
public static NavigationList PrepareContainer<T>(this NavigationList navigationList, PrepareContainerHandler<ItemContainer, T> prepare)| parameter | description |
|---|---|
| T | Item type. |
Remarks
Section titled “Remarks”The callback runs on every bind, which includes scrolling one back into view, so keep it cheap. Register event subscriptions through the supplied context and they are removed before the next item is bound; properties assigned directly are reset by the framework instead.
See Also
Section titled “See Also”- class NavigationList
- delegate PrepareContainerHandler<TContainer,TItem>
- class ItemContainer
- class ControlExtensions
- namespace Aprillz.MewUI.Controls
ControlExtensions.PrepareContainer<T> method (7 of 8)
Section titled “ControlExtensions.PrepareContainer<T> method (7 of 8)”Configures each segment container after its content is bound. The callback receives the container, the item, and its index; use it to set or bind any container property (enabled state, tooltip, etc.). Applied on every rebuild.
public static SegmentedControl PrepareContainer<T>(this SegmentedControl control, Action<SegmentButton, T, int> prepare)| parameter | description |
|---|---|
| T | Item type. |
| control | Target segmented control. |
| prepare | Container configuration callback. |
Return Value
Section titled “Return Value”The control for chaining.
See Also
Section titled “See Also”- class SegmentedControl
- class SegmentButton
- class ControlExtensions
- namespace Aprillz.MewUI.Controls
ControlExtensions.PrepareContainer<T> method (8 of 8)
Section titled “ControlExtensions.PrepareContainer<T> method (8 of 8)”Configures the container placed around each row once its content is bound, so behavior can be attached to the whole row, indent and expander included, instead of to the template.
public static TreeView PrepareContainer<T>(this TreeView treeView, PrepareContainerHandler<ItemContainer, T> prepare)| parameter | description |
|---|---|
| T | Item type. |
| treeView | Target tree view. |
| prepare | Container configuration callback. |
Return Value
Section titled “Return Value”The tree view for chaining.
Remarks
Section titled “Remarks”The callback runs on every bind, which includes scrolling a row back into view, so keep it cheap. Register event subscriptions through the supplied context and they are removed before the next item is bound; properties assigned directly are reset by the framework instead.
See Also
Section titled “See Also”- class TreeView
- delegate PrepareContainerHandler<TContainer,TItem>
- class ItemContainer
- class ControlExtensions
- namespace Aprillz.MewUI.Controls