New to Telerik UI for .NET MAUIStart a free 30-day trial

.NET MAUI ToolbarItem Overview

.NET MAUI Toolbar Visual Structure

The Telerik .NET MAUI Toolbar provides built-in toolbar items. The available items are described in the table below:

Toolbar ItemDescription
ToolbarItemRepresents a toolbar item in the Toolbar control. All toolbar items listed below inherits from ToolbarItem
EntryToolbarItemRepresents an entry toolbar item in the Toolbar control.
ButtonToolbarItemRepresents a button in the Toolbar control.
DropDownButtonToolbarItemRepresents a button displaying a drop-down panel in the Toolbar control.
DropDownMenuButtonToolbarItemRepresents a button displaying a drop-down menu in the Toolbar control.
ToggleButtonToolbarItemRepresents a toggle button in the Toolbar control.
RadioButtonToolbarItemRepresents a radio button in the Toolbar control.
NavigationButtonToolbarItemRepresents a navigation button in the Toolbar control.
SplitButtonToolbarItemRepresents a split button in the Toolbar control. Works as an advanced drop-down menu.
OptionsButtonToolbarItemRepresents a button displaying an options panel in the RadToolbar control.
SliderToolbarItemRepresents a slider in the Toolbar control
ListPickerButtonToolbarItemRepresents a list picker button in the Toolbar control.
LabelToolbarItemRepresents a label in the Toolbar control. The label can display a text and optionally an image next to it.
BusyIndicatorToolbarItemRepresents a busy indicator in the Toolbar control.
SeparatorToolbarItemRepresents a separator(which is an UI element) in the Toolbar control.
GroupToolbarItemOrganize toolbar items in a group.

In addition, you can define an option panel in the toolbar using the RadToolbarOptionsPanel.

Common properties for configuration

All toolbar items inherits from ToolbarItem. The available properties ToolbarItem provides are:

  • IsVisible(bool)—Specifies whether the toolbar item is visible.
  • IsEnabled(bool)—Specifies whether the toolbar item is enabled.
  • Style(Style)—Specifies the style applied to the toolbar item. Each toolbar item has a corresponding ToolbarItemView. And this is the target type of the Style.

For example the target type for ButtonToolbarItem Style is ButtonToolbarItemView.

  • ControlTemplate(Microsoft.Maui.Controls.ControlTemplate)—Specifies the template applied to the toolbar item. Each toolbar item has a corresponding ToolbarItemView. And this is the target type of the ControlTemplate.

  • PlacementOptions(enum of type Telerik.Maui.Controls.ToolbarItemPlacementOptions)—Defines the allowed placement options of the toolbar item in the toolbar. This type supports a bitwise combination of its members to enable more than one option. The available options are:

    • ToolStrip—The toolbar item appears in the main tool strip area of the toolbar.
    • DropDown—The toolbar item appears in the overflow drop-down menu of the toolbar.

Styling

Style the toolbar items using the Style(Style) property. Each toolbar item has a corresponding ToolbarItemView and this is the target type of the Style property.

Toolbar ItemStyle Target Type
ToolbarItemToolbarItemView
EntryToolbarItementryToolbarItemView
ButtonToolbarItemButtonToolbarItemView
DropDownButtonToolbarItemDropDownButtonToolbarItemView
DropDownMenuButtonToolbarItemDropDownMenuButtonToolbarItemView
ToggleButtonToolbarItemToggleButtonToolbarItemView
RadioButtonToolbarItemRadioButtonToolbarItemView
NavigationButtonToolbarItemNavigationButtonToolbarItemView
SplitButtonToolbarItemSplitButtonToolbarItemView
OptionsButtonToolbarItemOptionsButtonToolbarItemView
SliderToolbarItemSliderToolbarItemView
ListPickerButtonToolbarItemToolbarListItemView
LabelToolbarItemLabelToolbarItemView
BusyIndicatorToolbarItemBusyIndicatorToolbarItemView
SeparatorToolbarItemSeparatorToolbarItemView
GroupToolbarItemGroupToolbarItemView

Common properties that can be applied to the Style of each toolbar item are:

  • Orientation(enum of type Telerik.Maui.Controls.ToolbarOrientation)—Specifies the orientation of the toolbar item in the toolbar. The available options are:

    • Horizontal
    • Vertical
  • PlacementLocation(enum of type Telerik.Maui.Controls.ToolbarItemPlacementOptions)—Specifies the placement location of the toolbar item in the toolbar. This type supports a bitwise combination of its members to enable more than one option. The available options are:

    • ToolStrip—The toolbar item appears in the main tool strip area of the toolbar.
    • DropDown—The toolbar item appears in the overflow drop-down menu of the toolbar.
  • ControlTemplate(Microsoft.Maui.Controls.ControlTemplate)—Specifies the control template of the toolbar item.

  • BackgroundColor(Microsoft.Maui.Graphics.Color)—Specifies the background color of the toolbar item.

  • BorderColor(Microsoft.Maui.Graphics.Color)—Specifies the border color of the toolbar item.

  • BorderThickness(Microsoft.Maui.Thickness)—Specifies the border thickness of the toolbar item.

  • CornerRadius(Microsoft.Maui.Thickness)—Specifies the corner radius of the toolbar item.

  • ContentPadding(Microsoft.Maui.Thickness)—Specifies the content padding of the control.

See Also