public sealed class ToolbarThe strip of verbs across the top of a window.
Remarks
⚠ Toolbar has existed in Accessibility.cs with nothing to carry it. The editor draws its own strip out of bare UiElements — ToolbarPresenter.cs:51 — so no application could reach one and the role reached no screen reader. This is the carrier.
⚠ One tab stop, and the arrows move inside it. That is ARIA's toolbar pattern and it is the whole reason a toolbar is a control rather than a <Panel> with a class: a strip of fifteen buttons that are each a tab stop puts fifteen presses between a keyboard user and the document. The roving index is RadioGroup's, arranged around Active instead of around a checked value.
No overflow menu and no customisation. NSToolbar has both and they are the two features that make a toolbar a project rather than a control; an application that needs them today puts a Button at the end and opens its own menu. Said here rather than hinted at, because a half-built overflow is worse than none: a strip that silently drops its last three buttons at a narrow width is a strip whose verbs disappear with no way to find out where.
Fields and properties (7)
protected override string TagNameThe element name this type answers to when a caller does not choose one.
protected override bool AcceptsFocusprotected override AccessibleRole NativeRoleThe role this kind of element has when nobody says otherwise.
public Orientation Orientationpublic IReadOnlyList<UiElement> ItemsThe focusable things on it, in order.
public UiElement? ActiveWhich item is the strip's one tab stop.
public static readonly UiPropertyKey OrientationPropertyIdentity for Orientation.
Methods (4)
protected override void OnCreated()Builds whatever this element is made of, once, as it joins a document.
protected override void OnChildAdded(UiElement child)public void Rove()Brings the roving tab index into line with Active.
public void ClearOrientation()Unsets Orientation, so it takes its default or its ancestor's value again.
Used by (4)
- ApplicationBarTestsVixen.Ui.Controls.Tests
- EditorShellTestsVixen.Editor.Ui.Tests
- ToolbarPresenterVixen.Editor.Ui
- TransportTestsVixen.Editor.App.Tests