We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to set the LargeChange and SmallChange properties for the SfRangeSlider Control?

Platform: WPF |
Control: SfRangeSlider |
Published Date: February 18, 2015 |
Last Revised Date: June 21, 2019 |
.NET Framework: 4.5 |
Product Version: 12.4.0.24

The LargeChange and SmallChange are attached properties of the SfRangeSlider that specifies the distance of a thumb to be moved when the SfRangeSlider bar is clicked. The default value of LargeChange and SmallChange is 1.

To set the LargeChange and SmallChange properties for the SfRangeSlider, you need to add the SnapsTo and MoveToPoint properties of the SfRangeSlider.

How to set the SmallChange property for the SfRangeSlider

To set the SmallChange property for the SfRangeSlider, the SnapsTo value should be set as StepValues and MoveToPoint should be set as IncrementBySmallChange. So, the range of the SfRangeslider adds or subtracts the SmallChange from the value of the SfRangeSlider.

You can refer to the following code example.

XAML

//The code explains how to use the SmallChange property for the SfRangeSlider
<Window x:Class="SfRangeSlider.MainWindow"
        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"
        Title="MainWindow" Height="350" Width="525">
<Grid Name="grid1">
StackPanel  Orientation="Vertical">
            <TextBlock Text="SmallChange" Width="150" ></TextBlock>
            <syncfusion:SfRangeSlider SmallChange="2" Value="10" SnapsTo="StepValues"  MoveToPoint="IncrementBySmallChange" Width="300" Height="100" />
</StackPanel>
</Grid>
</Window>

 

C#

//The code explains how to use the SmallChange property for the SfRangeSlider
public MainWindow()
        {
            InitializeComponent();
                        StackPanel stack1 = new StackPanel();
            stack1.Orientation = Orientation.Vertical;
            TextBlock Text1 = new TextBlock();
            Text1.Text = "SmallChange";
            Text1.Width = 150;
            SfRangeSlider RangeSlider = new SfRangeSlider();
            RangeSlider.Width = 300;
            RangeSlider.Height = 100;
            RangeSlider.Value = 10;
            RangeSlider.SnapsTo = SliderSnapsTo.StepValues;
            RangeSlider.MoveToPoint = MovePoint.IncrementBySmallChange;
            RangeSlider.SmallChange = 2;
            stack1.Children.Add(Text1);
            stack1.Children.Add(RangeSlider);
            grid1.Children.Add(stack1);
             }

 

How to set the LargeChange property for the SfRangeSlider

To set the Largechange for the SfRangeSlider, the SnapsTo value should be set as StepValues and MoveToPoint should be set as IncrementByLargeChange. So, the range of the SfRangeslider adds or subtracts the LargeChange from the value of the SfRangeSlider.

You can refer to the following code example.

XAML

//Code explains how to use the LargeChange property for the SfRangeSlider.
<Window x:Class="SfRangeSlider.MainWindow"
        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"
        Title="MainWindow" Height="350" Width="525">
<Grid Name="grid1">
<StackPanel>
            <TextBlock Text="LargeChange" Width="150" ></TextBlock>
            <syncfusion:SfRangeSlider LargeChange="3" Value="10" SnapsTo="StepValues"   MoveToPoint="IncrementByLargeChange" Width="300" Height="100" />
</StackPanel>
</Grid>
</Window>

 

C#

//Code explains how to use the LargeChange property for the SfRangeSlider.
public MainWindow()
        {
            InitializeComponent();
            StackPanel stack1 = new StackPanel();
            stack1.Orientation = Orientation.Vertical;
            TextBlock Text1 = new TextBlock();
            Text1.Text = "LargeChange";
            Text1.Width = 150;
            SfRangeSlider RangeSlider = new SfRangeSlider();
            RangeSlider.Width = 300;
            RangeSlider.Height = 100;
            RangeSlider.Value = 10;
            RangeSlider.SnapsTo = SliderSnapsTo.StepValues;
            RangeSlider.MoveToPoint = MovePoint.IncrementByLargeChange;
            RangeSlider.LargeChange= 3;
            stack1.Children.Add(Text1);
            stack1.Children.Add(RangeSlider);
            grid1.Children.Add(stack1);
        }

 

2X faster development

The ultimate WPF UI toolkit to boost your development speed.
ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon