Skip to content

Skeleton

Skeleton is a loading placeholder shaped like the content it stands in for: size it with Width and Height. It pulses opacity slowly to read as “in progress” without implying a determinate value, unlike NaviusProgress. ShouldAnimate is read once at construction from ReducedMotion.AnimationsEnabled (backed by SystemParameters.ClientAreaAnimation, and testable via ReducedMotion.SetTestOverride), so the shimmer never runs when the OS “reduce animations” preference is on.

xmlns:skeleton="clr-namespace:Navius.Wpf.Ui.Skeleton;assembly=Navius.Wpf.Ui"
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/Navius.Wpf.Ui;component/Themes/Skeleton.xaml" />
</ResourceDictionary.MergedDictionaries>
<StackPanel>
<skeleton:NaviusSkeleton Width="200" Height="16" Margin="0,0,0,8" HorizontalAlignment="Left" />
<skeleton:NaviusSkeleton Width="320" Height="12" Margin="0,0,0,4" HorizontalAlignment="Left" />
<skeleton:NaviusSkeleton Width="260" Height="12" HorizontalAlignment="Left" />
</StackPanel>
Property Type Default From Description
ShouldAnimate bool true NaviusSkeleton Read-only. Snapshotted at construction from ReducedMotion.AnimationsEnabled; gates the shimmer storyboard in Themes/Skeleton.xaml. Not settable by a consumer.

NaviusSkeleton derives Control directly and overrides no CreateAutomationPeer, so it ships no custom automation peer; plain Control provides none by default, leaving the placeholder transparent to UI Automation as authored. The M6 audit called this family “clean and exemplary” for gating its shimmer Storyboard on ShouldAnimate, itself snapshotted from ReducedMotion.AnimationsEnabled, and for sourcing every brush via DynamicResource. The unit suite verifies ShouldAnimate flips with ReducedMotion.SetTestOverride(() => true/false) and that the template applies with Themes/Skeleton.xaml merged.