ToolBarControls.Avalonia

November 20, 2025 ยท View on GitHub

NuGet downloads

Description

This package provides two custom controls for Avalonia UI: ToolBar and ToolBarTray. These controls enable the creation of flexible, dockable toolbars with overflow functionality similar to traditional desktop applications. The ToolBarTray acts as a container that can hold multiple ToolBar instances, allowing them to be organized in bands and supporting both horizontal and vertical orientations. The controls include features like drag-and-drop repositioning, overflow menus for space-constrained scenarios, and keyboard navigation support.

API

ToolBar Properties

PROPERTY NAMETYPEDESCRIPTION
OrientationOrientationGets or sets the orientation of the ToolBar. This property is inherited and coerced by the parent ToolBarTray.
BandintGets or sets the band number where ToolBar should be located within the ToolBarTray.
BandIndexintGets or sets the band index number where ToolBar should be located within the band of ToolBarTray.
IsOverflowOpenboolGets or sets whether the overflow popup for this control is currently open. Supports two-way binding.
HasOverflowItemsboolGets or sets whether the ToolBar has overflow items.
IsOverflowItemboolGets or sets whether the item should overflow. This is an attached property that can be applied to child controls.
OverflowModeOverflowModeGets or sets the overflow mode of the ToolBar. Valid values are AsNeeded, Always, and Never.
MinVisibleItemsCountuintGets or sets the count of items that will not be overflowed while resizing the control.

ToolBarTray Properties

PROPERTY NAMETYPEDESCRIPTION
BackgroundIBrush?Gets or sets the background brush of the ToolBarTray.
OrientationOrientationGets or sets the orientation of the ToolBarTray (Horizontal or Vertical). Default is Horizontal.
IsLockedboolGets or sets whether the ToolBarTray is locked, preventing drag-and-drop repositioning of contained ToolBars.
ToolBarsCollection<ToolBar>Gets the collection of ToolBar controls contained within the ToolBarTray. This is the content property of the control.

Demos

ToolBar Demo

ToolBarTray Demo