ToolbarItem.BadgeText Property

Definition

Gets or sets the badge text displayed on this toolbar item. Set to a non-empty string to show a text/count badge, an empty string to show a dot indicator, or null to hide the badge. This is a bindable property.

public:
 property System::String ^ BadgeText { System::String ^ get(); void set(System::String ^ value); };
public string BadgeText { get; set; }
member this.BadgeText : string with get, set
Public Property BadgeText As String

Property Value

Remarks

Badge rendering varies by platform:

  • Android: Uses Material Design BadgeDrawable via BadgeUtils. Supports numeric and text badges on primary toolbar items. Empty string shows a small dot indicator.
  • iOS/MacCatalyst: Uses the native UIBarButtonItem.badge API introduced in iOS 26. On earlier iOS versions, the badge is silently ignored. Empty string shows a dot indicator.
  • Windows: Uses WinUI InfoBadge overlaid on the toolbar button. Numeric values display as counts; non-numeric text and empty string display as a dot indicator.

Badges are only displayed on primary toolbar items (items with Order set to Primary or Default). Secondary (overflow) items do not display badges.

Applies to