ToolbarItem

A button in the page's navigation bar.
public sealed class ToolbarItem

Properties

Command

Invoked when the item is tapped; its CanExecute drives the enabled state.

Type: ICommand?

public ICommand? Command { get; set; }

CommandParameter

The parameter passed to Command.

Type: object?

public object? CommandParameter { get; set; }

Icon

The local icon, or null for a text-only item.

Type: ImageSource?

public ImageSource? Icon { get; set; }

IsPrimary

Whether the item is rendered as the prominent action.

Type: bool

public bool IsPrimary { get; set; }

IsVisible

Whether the item is in the bar at all.

Contextual actions toggle it live, like a Delete that only exists in edit mode.

Type: bool

public bool IsVisible { get; set; }

Menu entries shown on tap instead of invoking Command. Empty for a plain item.

Type: IList<MenuAction>

public IList<MenuAction> Menu { get; }

Side

Which side of the bar the item sits on.

Type: ToolbarSide

public ToolbarSide Side { get; set; }

Text

The item's text, or null when it shows only an icon.

Type: string?

public string? Text { get; set; }

Tint

The item's tint, or null to follow the page or app tint.

Type: Color?

public Color? Tint { get; set; }