ScrollArea
Overview
Section titled “Overview”ScrollArea derives directly from the native ScrollViewer and is re-templated with overlay
scrollbars, inheriting native keyboard scrolling, mouse-wheel handling, and ScrollPattern
automation support for free through standard part names. IsHovering and IsScrolling mirror
the web contract’s hover/scroll fade state so the template can show and hide the bars without a
hand-rolled state machine.
xmlns:navius="clr-namespace:Navius.Wpf.Primitives.Controls;assembly=Navius.Wpf.Primitives"
<navius:NaviusScrollArea ScrollHideDelay="600"> <StackPanel> <!-- long content --> </StackPanel></navius:NaviusScrollArea>Properties
Section titled “Properties”| Property | Type | Default | From | Description |
|---|---|---|---|---|
IsHovering |
bool |
false |
NaviusScrollArea |
Read-only. true while the pointer is over the scroll area (real-time, no delay), driven by OnMouseEnter/OnMouseLeave. |
IsScrolling |
bool |
false |
NaviusScrollArea |
Read-only. true while a scroll is in progress or within ScrollHideDelay milliseconds of the last one; reset by an internal DispatcherTimer. |
ScrollHideDelay |
int |
600 |
NaviusScrollArea |
Milliseconds of scroll inactivity before IsScrolling resets to false. |
Content |
object |
- |
ScrollViewer |
The scrollable content. |
Keyboard interactions
Section titled “Keyboard interactions”| Key | Behavior |
|---|---|
Arrow keys / Page Up / Page Down / Home / End |
Native ScrollViewer keyboard scrolling, inherited unchanged; NaviusScrollArea intercepts no keys itself. |
UIA mechanism
Section titled “UIA mechanism”NaviusScrollArea ships no custom AutomationPeer and inherits the native
ScrollViewerAutomationPeer (reports AutomationControlType.Pane and implements
ScrollPattern) through the standard PART_ScrollContentPresenter/PART_VerticalScrollBar/
PART_HorizontalScrollBar part names declared in Themes/ScrollArea.xaml, so no
OnApplyTemplate override was needed. The re-templated ScrollBar parts carry their own
native ScrollBarAutomationPeer. The unit suite (ScrollAreaTests) verifies the
IsHovering/IsScrolling state transitions, the ScrollHideDelay timer, and that the applied
template exposes PART_ScrollContentPresenter/PART_VerticalScrollBar/PART_HorizontalScrollBar/
PART_Corner by name.
Web deltas
Section titled “Web deltas”- The web family renders five separate parts (Root/Viewport/Scrollbar/Thumb/Corner) as plain
divs with no ARIA roles at all; the WPF port collapses them onto oneScrollViewer-derived control plus itsControlTemplate. The nativeScrollViewerAutomationPeer/ScrollBarAutomationPeerpair is a strict accessibility upgrade over that ARIA-free baseline, not a gap. - Thumb size/offset ratio math (
ThumbSizeRatio/ThumbOffsetRatio, hand-rolled in the web’s JS) is not ported; the re-templated nativeScrollBar’s ownTrackcomputes thumb geometry fromTemplateBindings ontoValue/Maximum/ViewportSizeinstead. - The pointer-drag thumb gesture (a JS
dragScrollThumbmodule on the web) is not ported; the nativeThumb/Trackdrag-to-scroll behavior supersedes it entirely, including RTL handling (WPF’sFlowDirectionis the framework-level RTL mechanism, not the web’s manual sign-flip). Type(auto/always/hover/scrollscrollbar-visibility mode) is not ported as a discrete property; only the hover/scroll fade behavior is implemented viaIsHovering/IsScrollingtriggers, with bar presence governed by nativeScrollBarVisibilityinstead.ForceMount(keep a scrollbar mounted with no overflow) has no WPF equivalent property;Visibilityis the only presence control.Dir/RTL thumb-offset sign-flip normalization is dropped; WPF’sFlowDirectionalready handles RTL layout at the framework level.- M6 audit found no confirmed or plausible defects; the smaller ported surface (no
Type, noForceMount) is a deliberate scope reduction, not a behavioral gap.
Captures
Section titled “Captures”The ScrollArea Gallery page rendered at the pinned commit, in each theme.


