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 change the Orientation of SfRangeSlider in Xamarin.Forms

Platform: Xamarin.Forms |
Control: SfRangeSlider |
Published Date: April 13, 2017 |
Last Revised Date: April 13, 2017

How to change the orientation SfRangeSlider in Xamarin.Forms


Syncfusion SfRangeSlider allows us to change its orientation to Vertical or Horizontal. The code snippets and the steps to be followed to change the slider’s orientation is given below.


To change the Slider’s orientation follow the given procedure:


Step 1: Add all the necessary assemblies as instructed in our helping document.


Step 2: Create instance of SfRangeSlider and use Orientation property to set desire orientation. Default orientation will be Vertical


The below code illustrates the way to achieve this


Xaml Code:


        <StackLayout x:Name="stack" Orientation="Vertical">
            <slider:SfRangeSlider x:Name="range" SnapsTo="None" Orientation="Horizontal"  Minimum="0" Maximum="100" ShowRange="true">


C# Code:

    SfRangeSlider slider = new SfRangeSlider();
            slider.Minimum = 0;
            slider.Maximum = 100;
            slider.Orientation = Orientation.Horizontal;
            slider.ShowRange = true;
            slider.SnapsTo = SnapsTo.None;
            StackLayout stack = new StackLayout();
            stack.Padding = new Thickness(2050);
            this.Content = stack;












SfRangeSlider in Horizontal orientation SfRangeSlider in Vertical orientation





2X faster development

The ultimate Xamarin UI toolkit to boost your development speed.
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