locked
How to make Xamarin Forms Slider from Right to Left RRS feed

  • Question

  • User386335 posted

    By default, Xamarin forms Slider is from Left to Right

    I have a requirement where I need this slider starting count from left and moving towards right (Cross platform Android and iOS).

    Please can anyone share, how can we achieve this using Xamarin Forms?

    Tuesday, September 24, 2019 8:15 AM

Answers

  • User382871 posted

    @everest8848
    Set the Rotation property of Slider to '-180'. ```

    <Slider x:Name="slider"
            Maximum="20" 
            Rotation="-180"/>
    <Label x:Name="displayLabel"
           Text="{Binding Source={x:Reference slider},Path=Value, StringFormat='The Slider value is {0:F0}'}"
           HorizontalOptions="Center"
           VerticalOptions="CenterAndExpand" />
    

    ```

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Tuesday, September 24, 2019 9:36 AM

All replies

  • User382871 posted

    @everest8848
    Set the Rotation property of Slider to '-180'. ```

    <Slider x:Name="slider"
            Maximum="20" 
            Rotation="-180"/>
    <Label x:Name="displayLabel"
           Text="{Binding Source={x:Reference slider},Path=Value, StringFormat='The Slider value is {0:F0}'}"
           HorizontalOptions="Center"
           VerticalOptions="CenterAndExpand" />
    

    ```

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Tuesday, September 24, 2019 9:36 AM
  • User386335 posted

    @Jarvan Thank you

    Tuesday, September 24, 2019 10:13 AM