Badge
Overview
Section titled “Overview”Badge is a small pill-shaped ContentControl used for a status or count label. The corner
radius is a fixed pill value (999), not a Navius.Radius scale token, because no “full round”
token exists and a badge’s identity as a pill is independent of the control-radius scale.
xmlns:badge="clr-namespace:Navius.Wpf.Ui.Badge;assembly=Navius.Wpf.Ui"
<StackPanel Orientation="Horizontal"> <badge:NaviusBadge Variant="Default" Content="Default" /> <badge:NaviusBadge Variant="Secondary" Content="Secondary" /> <badge:NaviusBadge Variant="Outline" Content="Outline" /> <badge:NaviusBadge Variant="Destructive" Content="Destructive" /></StackPanel>Properties
Section titled “Properties”| Property | Type | Default | From | Description |
|---|---|---|---|---|
Variant |
NaviusBadgeVariant |
Default |
NaviusBadge |
Default, Secondary, Outline, or Destructive. Switches Background/Foreground/BorderBrush as a set. |
Content |
object |
- |
ContentControl |
The badge label. |
UIA mechanism
Section titled “UIA mechanism”NaviusBadge does not override OnCreateAutomationPeer, and ContentControl’s base
implementation does not create one either, so the control has no automation peer of its own;
assistive technology sees only the template’s border and content presenter. The unit suite
exercises variant-driven brush switching for Default, Destructive, and Outline
(tests/Navius.Wpf.Tests/UiDisplayItemsTests.cs), not an automation surface.