|
Window Framework for UI Toolkit v2.0.x
|
Used to define the items that will be displayed in the context menu. More...
Public Member Functions | |
| ContextMenuItem () | |
| Create a menu seperator in the menu. | |
| ContextMenuItem (bool isSeparator=true, string label=null, Action action=null, Func< bool > isVisible=null, Func< bool > isDisabled=null, Func< bool > isChecked=null, Object userData=null) | |
| Context Menu Default implementation with all possible options. | |
| ContextMenuItem (string label, Action action=null) | |
| Represents an individual item in a context menu, providing the label and action. | |
| ContextMenuItem (string label, Action action=null, Func< bool > isVisible=null) | |
| Represents an item in a context menu, including its label, action to be performed, and visibility logic. | |
| ContextMenuItem (string label, Action action=null, Func< bool > isVisible=null, Func< bool > isDisabled=null) | |
| Creates an item with supplied visibility/disabled predicates. | |
| ContextMenuItem (string label, Action action=null, Func< bool > isVisible=null, Func< bool > isDisabled=null, Func< bool > isChecked=null) | |
| Represents an item in a context menu, providing its display label, associated action, and optional logic for visibility, enablement, and selection state. | |
| ContextMenuItem (string label, Action action=null, Func< bool > isVisible=null, Func< bool > isDisabled=null, Func< bool > isChecked=null, Object userData=null) | |
| Represents an item in a context menu, providing its display label, associated action, and optional logic for visibility, enablement, and selection state. | |
Data Fields | |
| Action | Action |
| Optional application operation invoked on enabled item activation. | |
| Func< bool > | IsChecked |
| Checkmark predicate; supply a nonnull delegate for visible nonseparator items. | |
| Func< bool > | IsDisabled |
| Disabled-state predicate; supply a nonnull delegate for visible nonseparator items. | |
| bool | IsSeparator |
| Whether this entry renders a separator instead of an actionable row. | |
| Func< bool > | IsVisible |
| Visibility predicate evaluated on menu construction; null means visible. | |
| string | Label |
| Text displayed for a nonseparator item. | |
| Object | UserData |
| Application-owned metadata stored on this model. | |
Used to define the items that will be displayed in the context menu.
|
inline |
Represents an individual item in a context menu, providing the label and action.
| label | Text to display in the menu |
| action | Action to Invoke when activated |
|
inline |
Represents an item in a context menu, including its label, action to be performed, and visibility logic.
| label | Text to display in the menu |
| action | Action to Invoke when activated |
| isVisible | Bool Func - Should the item be displayed undercurrent conditions |
|
inline |
Creates an item with supplied visibility/disabled predicates.
Arguments are stored verbatim. Null IsVisible means visible, but null IsDisabled is not safe for a visible row because Show invokes it directly. Supply () => false when the item is enabled. Overloads that accept IsChecked likewise require a nonnull predicate.
| label | Text to display in the menu |
| action | Action to Invoke when activated |
| isVisible | Bool Func - Should the item be displayed undercurrent conditions |
| isDisabled | Bool Func - Show the item but in a disabled state based on data |
|
inline |
Represents an item in a context menu, providing its display label, associated action, and optional logic for visibility, enablement, and selection state.
| label | Text to display in the menu |
| action | Action to Invoke when activated |
| isVisible | Bool Func - Should the item be displayed undercurrent conditions |
| isDisabled | Bool Func - Show the item but in a disabled state based on data |
| isChecked | Bool Func - Show a check mark next to the item in the menu |
|
inline |
Represents an item in a context menu, providing its display label, associated action, and optional logic for visibility, enablement, and selection state.
| label | Text to display in the menu |
| action | Action to Invoke when activated |
| isVisible | Bool Func - Should the item be displayed undercurrent conditions |
| isDisabled | Bool Func - Show the item but in a disabled state based on data |
| isChecked | Bool Func - Show a check mark next to the item in the menu |
| userData | Optional user data object to store in the userdata container of the visual element |
|
inline |
Create a menu seperator in the menu.

|
inline |
Context Menu Default implementation with all possible options.
| isSeparator | Make the item as a seperator |
| label | Text to display in the menu |
| action | Action to Invoke when activated |
| isVisible | Bool Func - Should the item be displayed undercurrent conditions |
| isDisabled | Bool Func - Show the item but in a disabled state based on data |
| isChecked | Bool Func - Show a check mark next to the item in the menu |
| userData | Optional user data object to store in the userdata container of the visual element |
| Action GWG.WindowFramework.ContextMenuItem.Action |
Optional application operation invoked on enabled item activation.
Exceptions propagate and can prevent the subsequent renderer removal/onClose calls. The framework does not perform authorization or business validation for this callback.
| Func<bool> GWG.WindowFramework.ContextMenuItem.IsChecked |
Checkmark predicate; supply a nonnull delegate for visible nonseparator items.
| Func<bool> GWG.WindowFramework.ContextMenuItem.IsDisabled |
Disabled-state predicate; supply a nonnull delegate for visible nonseparator items.
True disables the action. This is the inverse of an enabled predicate.
| bool GWG.WindowFramework.ContextMenuItem.IsSeparator |
Whether this entry renders a separator instead of an actionable row.
| Func<bool> GWG.WindowFramework.ContextMenuItem.IsVisible |
Visibility predicate evaluated on menu construction; null means visible.
| string GWG.WindowFramework.ContextMenuItem.Label |
Text displayed for a nonseparator item.
| Object GWG.WindowFramework.ContextMenuItem.UserData |
Application-owned metadata stored on this model.
The current menu renderer does not transfer this value to the generated row. Capture required metadata in Action explicitly; do not rely on row.userData being populated.