RayCraftDocs
v1.0.3 raycraft.dev
On this page

MenuBar

Free

A horizontal menu bar for applications: top-level menus with commands, shortcuts, check marks, icons and submenus. Hovering switches between open menus and the arrow keys move through them.

Example

MenuBar control

Parameters

MenuBar

ParameterTypeDescription
ClassstringExtra CSS classes added to the root element.
LabelstringAccessible name of the bar.
MenusIReadOnlyList<MenuBarMenu>The top-level menus with their entries.
StylestringInline style added to the root element.

MenuCommand

ParameterTypeDescription
MemberDescription
LabelText of the entry; null makes a separator.
ActionCalled after the entry is picked.
ShortcutText shown at the end of the entry, such as Ctrl+S. It does not bind the keys.
DisabledDims the entry and ignores it.
Checkable, CheckedShows a check mark when checked.
ChildrenEntries of a submenu.
IconAn icon before the label.

Events

MenuBar

EventTypeDescription
OnCloseEventCallbackRaised when a menu is closed with Escape or a click outside.
OnPickEventCallback<MenuCommand>Raised with the picked command before its own Action runs.

Package

MenuBar is part of RayCraft Free. Package: RayCraft.Blazor. It comes from nuget.org. See Getting started.