Separator
Overview
Section titled “Overview”Separator (NaviusSeparator) is a single self-contained lookless Control rendering a horizontal
or vertical divider line. WPF’s stock Separator was rejected as a base because it has no
standalone Orientation of its own (it visually adapts to a hosting ItemsControl instead), so
this is a small custom control with its own Orientation dependency property.
xmlns:navius="clr-namespace:Navius.Wpf.Primitives.Controls;assembly=Navius.Wpf.Primitives"
<StackPanel> <TextBlock Text="Section one" /> <navius:NaviusSeparator /> <TextBlock Text="Section two" /> <navius:NaviusSeparator Orientation="Vertical" Decorative="True" /></StackPanel>Properties
Section titled “Properties”| Property | Type | Default | From | Description |
|---|---|---|---|---|
Orientation |
Orientation |
Horizontal |
NaviusSeparator |
Native WPF enum (Horizontal/Vertical); structurally rules out an invalid token, unlike the web contract’s runtime isValidOrientation guard. |
Decorative |
bool |
false |
NaviusSeparator |
When true, removed from the accessibility tree (IsControlElementCore/IsContentElementCore both return false). |
UIA mechanism
Section titled “UIA mechanism”NaviusSeparatorAutomationPeer (a FrameworkElementAutomationPeer) reports
AutomationControlType.Separator with an orientation-aware GetOrientationCore(). When
Decorative is true, IsControlElementCore()/IsContentElementCore() both return false
(combined with the base implementation, which additionally depends on UIElement.IsVisible),
removing the element from the accessibility tree. The pure decorative-vs-not decision is split into
a public static IsAccessibilityTreeMember(bool decorative) so it is unit-testable without a real,
shown window; the unit suite (9 tests) covers both that pure logic and the “decorative always forces
false” case on a real peer instance.
Web deltas
Section titled “Web deltas”Decorativeis modeled as one boolean-driven automation-peer override rather than two separate templates or peer classes, even though the web literally renders two differentdivs (with/ withoutrole).Orientationis the nativeSystem.Windows.Controls.Orientationenum rather than a string, which structurally obsoletes the web’sisValidOrientationinvalid-token guard (an enum has no “diagonal” value to reject).- WPF’s stock
Separatorcontrol was rejected as a base (no standaloneOrientation, adapts to a hostingItemsControlinstead); this is a small custom looklessControlinstead.
Captures
Section titled “Captures”The Separator Gallery page rendered at the pinned commit, in each theme.


