ToolBar class Core
A strip of commands: buttons, toggles, drop-downs and fields side by side, each at its own width, with ToolBar.Separator between groups. Tab enters at the first and leaves after the last as everywhere; inside, Left and Right move between the commands and Home and End jump to the ends, as in a Windows tool bar.
Styling. From the style sheets (Select.Type<ToolBar>()): the strip's background, border, corner radius and padding; the commands keep their own styles.
A screen reader reads a tool bar holding its commands, named by Control.AccessibleName.
public sealed class ToolBar : Control
- Namespace
- ArionUI.Presentation.Controls
- Package
- ArionUI.Presentation ·
dotnet add package ArionUI.Presentation --prerelease - Inherits
- Control
Constructors
ToolBar
public ToolBar();
Properties
Children
public override IEnumerable<Control> Children { get; }The controls inside this one, in tree order (visual order, tab order). A host keeps the tree it adopted: a control whose children change once it is adopted says so with Control.TreeChanged (on a shown board inside Board.Mutate), or its new children get no host and Tab, ticks and the wheel do not find them.
Gap
public double Gap { get; init; }The space between two commands.
Height
public double Height { get; init; }The strip's height.
Role
public override ControlRole Role { get; }What KIND of part this is for assistive technology — the automation peers translate it into their host's control type.
Methods
Add
public ToolBar Add(Control command, double? width = default);Adds command at the end; width fixes its width, null takes what it measures. Before the strip is shown.
Arrange
public override void Arrange(LogRect bounds);
HitTest
public override Control? HitTest(LogPoint p);The control under an ABSOLUTE point, or null. Containers recurse; leaves answer for themselves. Same bounds the render pass used.
Measure
public override LogSize Measure(LogSize available);Desired size given the space available (layout containers sum this).
Render
public override void Render(IRenderSurface s, ControlFrame frame);
Separator
public ToolBar Separator();A thin line between two groups of commands.