Vixen
dd8b0a81
csharp
public sealed class MenuBar

The 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 (5)

  • protected override string TagName

    The element name this type answers to when a caller does not choose one.

  • protected override bool AcceptsFocus

    Whether the focus can rest on this kind of control at all.

  • protected override AccessibleRole NativeRole
  • public IReadOnlyList<MenuBarItem> Items

    The names on the bar, in order.

  • public Menu? Current

    The menu currently dropped, if any.

Methods (4)

  • 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 OnChildAdded(UiElement child)
  • protected override void OnRemoved()

Used by (13)

  • ShellHelloUi
  • AccessibilityTreeTestsVixen.Ui.Controls.Tests
  • CommandMenuVixen.Ui.Controls.Tests
  • NestedTagTestsVixen.Ui.Controls.Advanced.Tests
  • 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
  • StringCatalogChainTestsVixen.Editor.App.Tests
  • ToolbarSectionTestsVixen.Editor.Ui.Tests