Loading...
Loading...
Implements Syncfusion WinUI Slider (SfSlider) control for numeric value selection in desktop applications. Use this when working with sliders, range selectors, value pickers, or interactive range controls. This skill covers slider configuration, ticks, labels, tooltips, value selection, and customization for WinUI applications.
npx skill4agent add syncfusion/winui-ui-components-skills syncfusion-winui-slider<!-- Add namespace -->
<Window xmlns:slider="using:Syncfusion.UI.Xaml.Sliders">
<Grid>
<slider:SfSlider Value="50"
Minimum="0"
Maximum="100"
Width="400"
Margin="20" />
</Grid>
</Window><slider:SfSlider Value="50"
Minimum="0"
Maximum="100"
Interval="10"
ShowLabels="True"
ShowTicks="True"
Width="400" /><slider:SfSlider Value="50"
Minimum="0"
Maximum="100"
Interval="10"
ShowLabels="True"
ShowTicks="True"
ShowDividers="True"
ShowToolTip="True"
MinorTicksPerInterval ="1"
Width="400"
Height="60" />using Syncfusion.UI.Xaml.Sliders;
// Create slider
SfSlider slider = new SfSlider();
slider.Value = 50;
slider.Minimum = 0;
slider.Maximum = 100;
slider.Interval = 10;
slider.ShowLabels = true;
slider.ShowTicks = true;
slider.Width = 400;
// Handle value changes
slider.ValueChanged += (sender, e) =>
{
double newValue = e.NewValue;
Console.WriteLine($"Value changed to: {newValue}");
};
// Add to layout
rootGrid.Children.Add(slider);<slider:SfSlider Value="{Binding Volume, Mode=TwoWay}"
Minimum="0"
Maximum="100"
Interval="10"
ShowLabels="True"
ShowTicks="True"
ShowToolTip="True"
Width="300">
</slider:SfSlider><slider:SfSlider Value="{Binding MaxPrice, Mode=TwoWay}"
Minimum="0"
Maximum="1000"
Interval="100"
ShowLabels="True"
ShowTicks="True"
Width="400">
</slider:SfSlider><slider:SfSlider Value="50"
Minimum="0"
Maximum="100"
Orientation="Vertical"
ShowLabels="True"
ShowTicks="True"
Height="300"
Width="80" /><slider:SfSlider Value="50"
IsEnabled="False"
ShowLabels="True"
ShowTicks="True"
Width="400" />| Property | Type | Description |
|---|---|---|
| | Current value of the slider |
| | Minimum value (default: 0) |
| | Maximum value (default: 100) |
| | Spacing between labels and ticks (default: calculated) |
| | Display value labels (default: false) |
| | Display tick marks (default: false) |
| | Display dividers between intervals (default: false) |
| | Display tooltip on thumb hover/drag (default: false) |
| | Horizontal or Vertical (default: Horizontal) |
| | Reverse the direction (default: false) |
| | Number of minor ticks per interval (default: 0) |
| | Height of the filled track |
| | Height of the unfilled track |
| | Height of divider markers |
| | Width of divider markers |
| Event | Description |
|---|---|
| Fired when the slider value changes |
xmlns:slider="using:Syncfusion.UI.Xaml.Sliders"