syncfusion-wpf-radial-slider
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseImplementing SfRadialSlider (WPF)
实现SfRadialSlider(WPF)
When to Use This Skill
使用场景
Use this skill when the user needs to:
- Add a circular/radial numeric value selector to a WPF application
- Configure value range (Minimum, Maximum), step intervals (SmallChange), or tick spacing (TickFrequency)
- Customize the start/end angle and sweep direction of the circular track
- Display the selected value inside the inner rim using Content or ContentTemplate
- Customize tick marks, tick labels, pointer, or preview pointer with DataTemplates
- Format tick label text dynamically via the DrawLabel event
- Style the inner rim, outer rim, foreground, and background
当用户需要以下功能时可使用本技能:
- 为WPF应用添加圆形/径向数值选择器
- 配置数值范围(Minimum、Maximum)、步长间隔(SmallChange)或刻度间距(TickFrequency)
- 自定义圆形轨道的起始/结束角度和扫描方向
- 使用Content或ContentTemplate在内部边缘显示选中的数值
- 通过DataTemplates自定义刻度标记、刻度标签、指针或预览指针
- 通过DrawLabel事件动态格式化刻度标签文本
- 设置内部边缘、外部边缘、前景色和背景色的样式
Component Overview
组件概述
SfRadialSlider
├── Outer rim — circular track background (Background, OuterRimStroke)
├── Ticks — tick marks on the track (TickRadiusFactor, TickTemplate)
├── Labels — tick value labels (LabelRadiusFactor, LabelTemplate, DrawLabel)
├── Pointer — selection indicator (PointerRadiusFactor, PointerStyle)
├── Preview pointer — hover indicator (PreviewPointerStyle)
└── Inner rim — center circle content area (InnerRimRadiusFactor, InnerRimFill, Content)Assemblies:
Syncfusion.SfRadialMenu.WPFSyncfusion.SfShared.WPF
Namespace:
XAML Schema:
Syncfusion.Windows.Controls.NavigationXAML Schema:
http://schemas.syncfusion.com/wpfSfRadialSlider
├── Outer rim — 圆形轨道背景(Background、OuterRimStroke)
├── Ticks — 轨道上的刻度标记(TickRadiusFactor、TickTemplate)
├── Labels — 刻度数值标签(LabelRadiusFactor、LabelTemplate、DrawLabel)
├── Pointer — 选择指示器(PointerRadiusFactor、PointerStyle)
├── Preview pointer — 悬停指示器(PreviewPointerStyle)
└── Inner rim — 中心圆形内容区域(InnerRimRadiusFactor、InnerRimFill、Content)程序集:
Syncfusion.SfRadialMenu.WPFSyncfusion.SfShared.WPF
命名空间:
XAML架构:
Syncfusion.Windows.Controls.NavigationXAML架构:
http://schemas.syncfusion.com/wpfDocumentation and Navigation Guide
文档与导航指南
Getting Started
入门指南
📄 Read: references/getting-started.md
- Assembly references and namespace
- XAML and C# control creation
- Selecting a value by drag or click
- Programmatic Value assignment
- ValueChanged event
- Themes with SfSkinManager
📄 阅读: references/getting-started.md
- 程序集引用和命名空间
- 通过XAML和C#创建控件
- 通过拖拽或点击选择数值
- 以编程方式赋值Value
- ValueChanged事件
- 使用SfSkinManager设置主题
Value and Range Configuration
数值与范围配置
📄 Read: references/value-and-range.md
- Value / Minimum / Maximum
- Displaying value in content area (Content + ContentTemplate)
- SmallChange — step interval
- TickFrequency — tick spacing
- ShowMaximumValue — show max when not a multiple
- StartAngle / EndAngle — arc extent
- SweepDirection — clockwise or counterclockwise
📄 阅读: references/value-and-range.md
- Value / Minimum / Maximum
- 在内容区域显示数值(Content + ContentTemplate)
- SmallChange — 步长间隔
- TickFrequency — 刻度间距
- ShowMaximumValue — 当最大值不是TickFrequency的倍数时显示最大值
- StartAngle / EndAngle — 弧度范围
- SweepDirection — 顺时针或逆时针
Ticks, Labels, and Templates
刻度、标签与模板
📄 Read: references/ticks-and-templates.md
- TickRadiusFactor / TickVisibility / TickTemplate
- LabelRadiusFactor / LabelVisibility / LabelTemplate
- InnerRimRadiusFactor / OuterRimRadiusFactor
- PointerRadiusFactor / PointerStyle
- PreviewPointerStyle
- DrawLabel event — per-label text, color, font
📄 阅读: references/ticks-and-templates.md
- TickRadiusFactor / TickVisibility / TickTemplate
- LabelRadiusFactor / LabelVisibility / LabelTemplate
- InnerRimRadiusFactor / OuterRimRadiusFactor
- PointerRadiusFactor / PointerStyle
- PreviewPointerStyle
- DrawLabel事件 — 自定义单个标签的文本、颜色、字体
Appearance and Styling
外观与样式设置
📄 Read: references/appearance.md
- Foreground / Background
- InnerRimFill / InnerRimStroke / InnerRimStrokeThickness
- OuterRimStroke / OuterRimStrokeThickness
- FlowDirection (RTL)
- SfSkinManager themes
📄 阅读: references/appearance.md
- Foreground / Background
- InnerRimFill / InnerRimStroke / InnerRimStrokeThickness
- OuterRimStroke / OuterRimStrokeThickness
- FlowDirection(RTL)
- SfSkinManager主题
Quick Start
快速开始
xaml
xmlns:syncfusion="http://schemas.syncfusion.com/wpf"
<syncfusion:SfRadialSlider Name="radialSlider"
Height="200" Width="200"/>csharp
using Syncfusion.Windows.Controls.Navigation;
SfRadialSlider radialSlider = new SfRadialSlider();
radialSlider.Height = 200;
radialSlider.Width = 200;
this.Content = radialSlider;Display selected value inside the inner rim:
xaml
<syncfusion:SfRadialSlider Value="{Binding SelectedValue, Mode=TwoWay}"
Content="{Binding SelectedValue, Mode=TwoWay}"
Height="200" Width="200">
<syncfusion:SfRadialSlider.DataContext>
<local:ViewModel/>
</syncfusion:SfRadialSlider.DataContext>
</syncfusion:SfRadialSlider>xaml
xmlns:syncfusion="http://schemas.syncfusion.com/wpf"
<syncfusion:SfRadialSlider Name="radialSlider"
Height="200" Width="200"/>csharp
using Syncfusion.Windows.Controls.Navigation;
SfRadialSlider radialSlider = new SfRadialSlider();
radialSlider.Height = 200;
radialSlider.Width = 200;
this.Content = radialSlider;在内部边缘显示选中的数值:
xaml
<syncfusion:SfRadialSlider Value="{Binding SelectedValue, Mode=TwoWay}"
Content="{Binding SelectedValue, Mode=TwoWay}"
Height="200" Width="200">
<syncfusion:SfRadialSlider.DataContext>
<local:ViewModel/>
</syncfusion:SfRadialSlider.DataContext>
</syncfusion:SfRadialSlider>Common Patterns
常见模式
| Scenario | Approach |
|---|---|
| Temperature selector 0–100 | |
| Full circle vs arc | |
| Snap to multiples of 5 | |
| Reduce tick count | |
| Counterclockwise arc | |
| Show max label | |
| Color-code labels by value | Handle |
| Custom pointer style | |
| Display formatted value in center | |
| 场景 | 实现方式 |
|---|---|
| 0–100温度选择器 | |
| 完整圆形 vs 弧形 | |
| 按5的倍数步进 | |
| 减少刻度数量 | |
| 逆时针弧形 | |
| 显示最大值标签 | |
| 按数值为标签配色 | 处理 |
| 自定义指针样式 | |
| 在中心显示格式化数值 | |
Key Properties
关键属性
| Property | Default | Description |
|---|---|---|
| | Currently selected value |
| | Minimum tick value |
| | Maximum tick value |
| | Smallest selectable increment |
| | Spacing between displayed ticks |
| | Show max when not a TickFrequency multiple |
| | Start angle of the circular arc |
| | End angle of the circular arc |
| | Tick direction |
| | Content shown inside inner rim |
| | DataTemplate for inner rim content |
| | Inner circle radius (0–1) |
| | Outer rim radius (0–1) |
| | Tick mark position radius |
| | Label position radius |
| | Pointer position radius |
| | Show/hide tick marks |
| | Show/hide tick labels |
| 属性 | 默认值 | 描述 |
|---|---|---|
| | 当前选中的数值 |
| | 最小刻度值 |
| | 最大刻度值 |
| | 最小可选增量 |
| | 显示的刻度之间的间距 |
| | 当最大值不是TickFrequency的倍数时显示最大值 |
| | 圆形弧度的起始角度 |
| | 圆形弧度的结束角度 |
| | 刻度方向 |
| | 内部边缘显示的内容 |
| | 内部边缘内容的DataTemplate |
| | 内部圆形的半径系数(0–1) |
| | 外部边缘的半径系数(0–1) |
| | 刻度标记的位置半径系数 |
| | 标签的位置半径系数 |
| | 指针的位置半径系数 |
| | 显示/隐藏刻度标记 |
| | 显示/隐藏刻度标签 |