csharp
public sealed class MenuBarThe strip of menus along the top of a window.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
⚠ Once one menu is open, hovering another opens it. That is not decoration — it is what every menu bar does, and without it a user who opened the wrong menu has to click twice to see the right one. It is also why the bar tracks whether anything is open at all: the same hover with nothing open must do nothing.
Fields and properties (4)
protected override string TagNameThe element name this type answers to when a caller does not choose one.
protected override bool AcceptsFocusWhether the focus can rest on this kind of control at all.
public IReadOnlyList<MenuBarItem> ItemsThe names on the bar, in order.
public Menu? CurrentThe menu currently dropped, if any.
Methods (3)
protected override void OnCreated()Builds whatever this element is made of, once, as it joins a document.
public Menu AddMenu(string? label = null)Adds a name and the menu it drops.
protected override void OnRemoved()
Used by (9)
- ShellHelloUi
- OverlayLifetimeTestsVixen.Ui.Controls.Tests
- SurfaceTestsVixen.Ui.Controls.Tests
- EditorSessionVixen.Editor.Testing
- EditorShellTestsVixen.Editor.Ui.Tests
- MenuBarTestsVixen.Editor.App.Tests
- MenuPresenterVixen.Editor.Ui
- MenuTestsVixen.Editor.Ui.Tests
- ToolbarSectionTestsVixen.Editor.Ui.Tests