syncfusion-wpf-step-progressbar
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseImplementing WPF SfStepProgressBar
实现WPF SfStepProgressBar
The is a multi-step progress indicator for visualizing sequential workflows. Each step is a with active, inactive, or indeterminate status. Use it for order tracking, registration wizards, checkout flows, onboarding, or any process with discrete numbered stages.
SfStepProgressBarStepViewItemSfStepProgressBarStepViewItemWhen to Use This Skill
何时使用该组件
- User needs a step-by-step progress UI (wizard, checkout, order tracker)
- Displaying multiple stages with active/inactive/in-progress states
- Building vertical or horizontal step indicators with custom markers
- Binding steps from a data collection (MVVM / XML)
- Customizing marker shapes, connector colors, or step templates by status
- 用户需要分步进度UI(向导、结账、订单跟踪器)
- 展示具有激活/未激活/进行中状态的多个阶段
- 构建带有自定义标记的垂直或水平步骤指示器
- 从数据集合绑定步骤(MVVM / XML)
- 根据状态自定义标记形状、连接线颜色或步骤模板
Quick Start
快速开始
xaml
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Syncfusion="http://schemas.syncfusion.com/wpf"
x:Class="MyApp.MainWindow">
<Grid x:Name="grid">
<Syncfusion:SfStepProgressBar SelectedIndex="2" SelectedItemStatus="Indeterminate">
<Syncfusion:StepViewItem Content="Ordered" />
<Syncfusion:StepViewItem Content="Packed" />
<Syncfusion:StepViewItem Content="Shipped" />
<Syncfusion:StepViewItem Content="Delivered" />
</Syncfusion:SfStepProgressBar>
</Grid>
</Window>csharp
using Syncfusion.UI.Xaml.ProgressBar;
SfStepProgressBar stepProgressBar = new SfStepProgressBar();
stepProgressBar.Items.Add(new StepViewItem { Content = "Ordered" });
stepProgressBar.Items.Add(new StepViewItem { Content = "Packed" });
stepProgressBar.Items.Add(new StepViewItem { Content = "Shipped" });
stepProgressBar.Items.Add(new StepViewItem { Content = "Delivered" });
stepProgressBar.SelectedIndex = 2;
stepProgressBar.SelectedItemStatus = StepStatus.Indeterminate;
grid.Children.Add(stepProgressBar);- — zero-based index of the last active step (all steps before it become Active)
SelectedIndex - — status of the selected step:
SelectedItemStatus,Active, orInactiveIndeterminate
xaml
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Syncfusion="http://schemas.syncfusion.com/wpf"
x:Class="MyApp.MainWindow">
<Grid x:Name="grid">
<Syncfusion:SfStepProgressBar SelectedIndex="2" SelectedItemStatus="Indeterminate">
<Syncfusion:StepViewItem Content="Ordered" />
<Syncfusion:StepViewItem Content="Packed" />
<Syncfusion:StepViewItem Content="Shipped" />
<Syncfusion:StepViewItem Content="Delivered" />
</Syncfusion:SfStepProgressBar>
</Grid>
</Window>csharp
using Syncfusion.UI.Xaml.ProgressBar;
SfStepProgressBar stepProgressBar = new SfStepProgressBar();
stepProgressBar.Items.Add(new StepViewItem { Content = "Ordered" });
stepProgressBar.Items.Add(new StepViewItem { Content = "Packed" });
stepProgressBar.Items.Add(new StepViewItem { Content = "Shipped" });
stepProgressBar.Items.Add(new StepViewItem { Content = "Delivered" });
stepProgressBar.SelectedIndex = 2;
stepProgressBar.SelectedItemStatus = StepStatus.Indeterminate;
grid.Children.Add(stepProgressBar);- — 最后一个激活步骤的从零开始的索引(其之前的所有步骤都会变为激活状态)
SelectedIndex - — 选中步骤的状态:
SelectedItemStatus、Active或InactiveIndeterminate
Documentation and Navigation Guide
文档与导航指南
Getting Started
入门指南
📄 Read: references/getting-started.md
- NuGet package and assembly setup
- XAML namespace and schema import
- Basic step bar with 4 items
- Code-behind creation
- Applying SfSkinManager themes
📄 阅读: references/getting-started.md
- NuGet包和程序集设置
- XAML命名空间和架构导入
- 包含4个项的基础步骤进度条
- 代码后置创建方式
- 应用SfSkinManager主题
Selected Item & Status
选中项与状态
📄 Read: references/selected-item-and-status.md
- SelectedIndex — controlling which step is active
- SelectedItemStatus (Active / Inactive / Indeterminate)
- SelectedItemProgress — partial fill on the current step
- AnimationDuration — transition speed between steps
- MVVM binding patterns for dynamic step advancement
📄 阅读: references/selected-item-and-status.md
- SelectedIndex — 控制哪个步骤处于激活状态
- SelectedItemStatus(Active / Inactive / Indeterminate)
- SelectedItemProgress — 当前步骤的部分填充进度
- AnimationDuration — 步骤间切换的过渡速度
- 用于动态步骤推进的MVVM绑定模式
Appearance
外观定制
📄 Read: references/appearance.md
- MarkerShapeType (Circle vs Square)
- Orientation (Horizontal vs Vertical)
- Connector color and thickness customization
- MarkerClicked event for click-to-navigate behavior
📄 阅读: references/appearance.md
- MarkerShapeType(圆形 vs 方形)
- Orientation(水平 vs 垂直)
- 连接线颜色和粗细定制
- 用于点击导航行为的MarkerClicked事件
Layouts
布局设置
📄 Read: references/layouts.md
- ItemsStretch: None / Fill / Auto
- ItemSpacing — gap in None mode
- MinimumItemSpacing — minimum gap in Fill mode
- Auto stretch for vertical content-driven sizing
📄 阅读: references/layouts.md
- ItemsStretch:None / Fill / Auto
- ItemSpacing — None模式下的间距
- MinimumItemSpacing — Fill模式下的最小间距
- 针对垂直内容驱动尺寸的自动拉伸
Data Binding & Templates
数据绑定与模板
📄 Read: references/data-binding-and-templates.md
- ItemsSource + ItemContainerStyle for MVVM binding
- XML data source binding
- ItemTemplate — custom step marker content
- ItemTemplateSelector — status-based template switching
- MarkerTemplateSelector — custom marker per step status
- SecondaryContentTemplate — labels below/beside markers
- SecondaryContentTemplateSelector
📄 阅读: references/data-binding-and-templates.md
- ItemsSource + ItemContainerStyle用于MVVM绑定
- XML数据源绑定
- ItemTemplate — 自定义步骤标记内容
- ItemTemplateSelector — 基于状态的模板切换
- MarkerTemplateSelector — 基于步骤状态的自定义标记
- SecondaryContentTemplate — 标记下方/旁边的标签
- SecondaryContentTemplateSelector
Key Properties
关键属性
| Property | Type | Default | Purpose |
|---|---|---|---|
| | — | Zero-based index of last active step |
| | | Status of the selected step |
| | | Partial fill % on the selected step |
| | | Step transition animation speed |
| | | Horizontal or vertical layout |
| | | Circle or Square step markers |
| | — | Color of connector between active steps |
| | — | Color of connector between inactive steps |
| | — | Thickness of connector lines |
| | | How items fill available space |
| | | Space between steps (None stretch) |
| 属性 | 类型 | 默认值 | 用途 |
|---|---|---|---|
| | — | 最后一个激活步骤的从零开始的索引 |
| | | 选中步骤的状态 |
| | | 当前步骤的部分填充百分比 |
| | | 步骤过渡动画速度 |
| | | 水平或垂直布局 |
| | | 圆形或方形步骤标记 |
| | — | 激活步骤间连接线的颜色 |
| | — | 未激活步骤间连接线的颜色 |
| | — | 连接线的粗细 |
| | | 项填充可用空间的方式 |
| | | 步骤间的间距(None拉伸模式下) |
Common Use Cases
常见用例
- Order tracking: 4-step bar (Ordered → Packed → Shipped → Delivered) with for the in-transit step
SelectedItemStatus="Indeterminate" - Registration wizard: Vertical orientation with to fill the panel height
ItemsStretch="Fill" - Onboarding flow: Custom to show checkmarks on completed steps and spinner on current
MarkerTemplateSelector - MVVM dashboard: bound to
ItemsSourcewithObservableCollection<StepItem>bound to a commandSelectedIndex
- 订单跟踪: 4步骤进度条(已下单 → 已打包 → 已发货 → 已送达),对运输中的步骤设置
SelectedItemStatus="Indeterminate" - 注册向导: 垂直布局,设置以填充面板高度
ItemsStretch="Fill" - 入门引导流程: 自定义,对已完成步骤显示勾选标记,当前步骤显示加载动画
MarkerTemplateSelector - MVVM仪表板: 绑定到
ItemsSource,ObservableCollection<StepItem>绑定到命令SelectedIndex