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. Image for the cookie policy date
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

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


Code snippet:

Xaml Code:

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


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(20, 50);            stack.Children.Add(slider);            this.Content = stack; 



SfRangeSlider in Horizontal orientation              SfRangeSlider in Vertical orientation



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.

Up arrow icon

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

Live Chat Icon For mobile