Breadcrumb
Overview
Section titled “Overview”Breadcrumb is a root ItemsControl whose items are NaviusBreadcrumbItem and
NaviusBreadcrumbSeparator instances interleaved directly by the consumer, the same
manual-separator-placement contract as shadcn/ui’s own BreadcrumbList/BreadcrumbSeparator
anatomy. It wraps children in a horizontal WrapPanel so a long trail reflows on narrow widths
instead of clipping. NaviusBreadcrumbItem folds the web’s separate link/current-page parts
into one control: IsCurrentPage="False" renders as a clickable link, IsCurrentPage="True"
renders as plain, non-interactive text.
xmlns:breadcrumb="clr-namespace:Navius.Wpf.Ui.Breadcrumb;assembly=Navius.Wpf.Ui"
<breadcrumb:NaviusBreadcrumb> <breadcrumb:NaviusBreadcrumbItem Content="Home" /> <breadcrumb:NaviusBreadcrumbSeparator /> <breadcrumb:NaviusBreadcrumbItem Content="Projects" /> <breadcrumb:NaviusBreadcrumbSeparator /> <breadcrumb:NaviusBreadcrumbItem Content="Navius.Wpf" IsCurrentPage="True" /></breadcrumb:NaviusBreadcrumb>Properties
Section titled “Properties”| Property | Type | Default | From | Description |
|---|---|---|---|---|
Items |
ItemCollection |
empty | ItemsControl (NaviusBreadcrumb) |
Populated directly with NaviusBreadcrumbItem/NaviusBreadcrumbSeparator instances, not a data-bound ItemsSource. |
IsCurrentPage |
bool |
false |
NaviusBreadcrumbItem |
true marks the trail’s terminal, non-navigable entry: renders as plain text, sets Focusable to false, and stamps current onto AutomationProperties.ItemStatus. |
Command |
ICommand? |
null |
NaviusBreadcrumbItem |
Executed on activation (mouse or Enter/Space) when not the current page, via ICommandSource. |
CommandParameter |
object? |
null |
NaviusBreadcrumbItem |
Passed to Command. |
CommandTarget |
IInputElement? |
null |
NaviusBreadcrumbItem |
Command target; defaults to the item itself. |
Content |
object |
- |
ContentControl (NaviusBreadcrumbItem) |
The crumb’s label. |
NaviusBreadcrumbSeparator has no properties beyond the standard Control surface; it is a
purely decorative chevron glyph with Focusable and IsTabStop both fixed false.
Events
Section titled “Events”| Event | Signature | Fires when |
|---|---|---|
Click |
RoutedEventHandler |
A non-current NaviusBreadcrumbItem is activated by mouse or Enter/Space. Never raised while IsCurrentPage is true. |
Keyboard interactions
Section titled “Keyboard interactions”| Key | Behavior |
|---|---|
Tab |
Standard focus traversal across crumbs; a current-page item is excluded (Focusable = false). |
Enter / Space |
Activates a non-current crumb: raises Click and executes Command if set. No-op on the current-page item. |
UIA mechanism
Section titled “UIA mechanism”NaviusBreadcrumb does not override OnCreateAutomationPeer; ItemsControl’s base
implementation supplies ItemsControlAutomationPeer, which reports
AutomationControlType.List. The constructor also calls
AutomationProperties.SetItemStatus(this, "breadcrumb"), the closest UIA hook to a nav landmark,
surfaced through the inherited peer’s item-status property.
NaviusBreadcrumbItemAutomationPeer (a FrameworkElementAutomationPeer) overrides
GetAutomationControlTypeCore() to report Hyperlink for a navigable crumb and Text once
IsCurrentPage is true. Toggling IsCurrentPage also stamps AutomationProperties.ItemStatus
to "current", the closest supported hook for the web’s aria-current="page" since WPF/UIA has
no dedicated current-page concept.
NaviusBreadcrumbSeparatorAutomationPeer overrides IsControlElementCore() to return false,
excluding the separator from the control view entirely so screen readers skip the chevron rather
than announcing a meaningless “separator” between crumb names.
The unit suite (tests/Navius.Wpf.Tests/UiBreadcrumbTests.cs) exercises NaviusBreadcrumbItem
defaults, IsCurrentPage toggling ItemStatus and Focusable, Click gating on
IsCurrentPage, and NaviusBreadcrumbSeparator’s Focusable/IsTabStop being false. The M6
audit found this family clean: every foreground/ring brush is sourced via DynamicResource, no
C# template-part lookup, no animation, no two-way-to-readonly binding.
Web deltas
Section titled “Web deltas”IsCurrentPagedrivesAutomationProperties.ItemStatus = "current"rather thanaria-current="page": WPF/UIA has no dedicated current-page concept, soItemStatusis the closest supported hook for assistive technology.