public sealed record DesktopMenu : DesktopMenuEntry, IEquatable<DesktopMenu> A menu of the menu bar, or a submenu of any menu.
Parameters
TitleThe visible title, literal text in the user's language: not blank, at most 128 characters. Mnemonic markers such as
&or_are shown as written.ItemsThe items, separators and submenus, in order.
Constructors
DesktopMenu
public DesktopMenu(string Title, ImmutableArray<DesktopMenuEntry> Items) A menu of the menu bar, or a submenu of any menu.
Parameters
TitleThe visible title, literal text in the user's language: not blank, at most 128 characters. Mnemonic markers such as
&or_are shown as written.ItemsThe items, separators and submenus, in order.
Properties
AccessKey
public char? AccessKey { get; init; } Gets the menu's access key, a letter or digit of the title's language, or null for none.
Remarks
Windows and Linux underline it in the title and open the menu with Alt and the key; Runic places the marker, so the title stays literal text. When the title does not contain the key, it is shown after the title, as in Fichier (F). macOS and status icon menus ignore it.
IsEnabled
public bool IsEnabled { get; init; } Gets whether the menu can be opened; a disabled menu also disables its entries.
Items
public ImmutableArray<DesktopMenuEntry> Items { get; init; } The items, separators and submenus, in order.
Role
public DesktopMenuRole Role { get; init; } Gets where the menu goes in the menu bar; ignored for a submenu and in a status icon menu.
Title
public string Title { get; init; } The visible title, literal text in the user's language: not blank, at most 128 characters. Mnemonic markers such as & or _ are shown as written.