Skip to content

A vertical step list with an animated progress rail and a crossfading detail card. Steps advance automatically or on demand, and each step can show its own card content.

Usage ​

xml
<dev:VisualStepper Height="320" Autoplay="False" Interval="2500" PauseOnHover="True" ShowCard="True">
    <dev:VisualStepper.Steps>
        <dev:VisualStepperStep Title="Pick a Skill" Description="Choose a curated style" />
        <dev:VisualStepperStep Title="Copy Skill Expression" Description="Customize &amp; copy" />
        <dev:VisualStepperStep Title="Prompt in Codex" Description="Type the visual you want" />
        <dev:VisualStepperStep Title="Use Visual Asset" Description="App-ready asset is ready" />
    </dev:VisualStepper.Steps>
</dev:VisualStepper>

Properties ​

PropertyTypeDefaultDescription
StepsObservableCollection<VisualStepperStep>emptyThe steps shown in the list.
SelectedIndexint0Index of the active step. Values outside the range are clamped.
AutoplaybooltrueFills the active step's rail over Interval, then advances to the next step and wraps to the first after the last.
Intervaldouble2500Time in milliseconds each step stays active during autoplay. Minimum effective value is 100.
PauseOnHoverbooltruePauses autoplay while the pointer is over the control or it has keyboard focus.
ShowCardbooltrueShows or hides the detail card beside the step list.
CardTemplateDataTemplate?built-in templateTemplate used to render the card. Its data context is a VisualStepperItem.
InactiveStepOpacitydouble0.55Opacity of steps that are not active.
TrackBrushBrush?VisualStepperTrackBrushBrush of the rail behind each step.
ProgressBrushBrush?VisualStepperProgressBrushBrush of the filled portion of the rail.
DescriptionForegroundBrush?VisualStepperDescriptionForegroundBrushForeground of each step's description.

Events ​

EventSignatureDescription
StepChangedTypedEventHandler<VisualStepper, int>Raised when the active step changes. The argument is the new index.

VisualStepperStep ​

PropertyTypeDescription
TitlestringStep title.
Descriptionstring?Optional secondary text. Hidden when empty.
Contentobject?Optional payload for use in a custom card template.

VisualStepperStep implements INotifyPropertyChanged, so changing a property while the control is loaded updates the row immediately.

VisualStepperItem ​

The data context of the card template.

PropertyTypeDescription
IndexintZero-based index of the step.
StepVisualStepperStepThe step the card represents.

Custom card template ​

Use x:DataType and x:Bind so the template stays AOT-friendly.

xml
<dev:VisualStepper>
    <dev:VisualStepper.CardTemplate>
        <DataTemplate x:DataType="dev:VisualStepperItem">
            <Border Padding="24" Background="{ThemeResource CardBackgroundFillColorDefaultBrush}" CornerRadius="12">
                <StackPanel Spacing="8">
                    <TextBlock Style="{ThemeResource SubtitleTextBlockStyle}" Text="{x:Bind Step.Title, Mode=OneWay}" />
                    <ContentPresenter Content="{x:Bind Step.Content, Mode=OneWay}" />
                </StackPanel>
            </Border>
        </DataTemplate>
    </dev:VisualStepper.CardTemplate>
</dev:VisualStepper>

Set SelectedIndex from code, for example from Back and Next buttons:

csharp
private void OnNext(object sender, RoutedEventArgs e) => Stepper.SelectedIndex++;

private void OnBack(object sender, RoutedEventArgs e) => Stepper.SelectedIndex--;

Clicking a step also selects it.

Keyboard ​

KeyAction
Down, RightNext step
Up, LeftPrevious step
HomeFirst step
EndLast step

Styling ​

Override these theme resources to restyle the control:

ResourceDefault
VisualStepperTrackBrushDividerStrokeColorDefaultBrush
VisualStepperProgressBrushAccentFillColorDefaultBrush
VisualStepperDescriptionForegroundBrushTextFillColorSecondaryBrush

High contrast uses SystemColorGrayTextColorBrush, SystemColorHighlightColorBrush and SystemColorWindowTextColorBrush.

Template parts ​

PartType
PART_RootGrid
PART_StepsPanelStackPanel
PART_CardHostGrid
PART_CardAContentPresenter
PART_CardBContentPresenter

Accessibility ​

Each step exposes its title as the automation name, its description as help text, its position in the set, and current as the item status when active. The control is a tab stop and supports system focus visuals.

NOTE

  • With Autoplay off, the active step's rail is shown fully filled.
  • With fewer than two steps, autoplay does not run.
  • Setting ShowCard to false collapses the card column and its spacing.

VisualStepper

Demo ​

you can run demo and see this feature.

Released under the MIT License.