Class MenuItem
- Namespace
- PluginUI
- Assembly
- PluginUI.dll
Menu entry used by context menus, drop-downs and menu buttons.
public sealed class MenuItem
- Inheritance
-
MenuItem
- Inherited Members
Constructors
MenuItem(string, Action?)
Creates an entry.
public MenuItem(string text, Action? action = null)
Parameters
Properties
Action
Invoked when the entry is chosen.
[Browsable(false)]
public Action? Action { get; set; }
Property Value
HasSubmenu
true if the entry opens a sub-menu.
public bool HasSubmenu { get; }
Property Value
IsChecked
Shows a check mark.
public bool IsChecked { get; set; }
Property Value
IsEnabled
Selectable when true.
public bool IsEnabled { get; set; }
Property Value
IsSeparator
Separator entry.
public bool IsSeparator { get; }
Property Value
Items
Sub-menu entries (non-empty = this entry opens a sub-menu).
public List<MenuItem> Items { get; }
Property Value
ShortcutText
Shortcut hint displayed on the right (informative only).
public string? ShortcutText { get; set; }
Property Value
Tag
Free user data.
[Browsable(false)]
public object? Tag { get; set; }
Property Value
Text
Displayed text.
public string Text { get; set; }
Property Value
Methods
Separator()
A separator line.
public static MenuItem Separator()