Everest
Everest

Reputation: 23

How to make Xamarin Forms Slider from Right to Left

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?

Sample_Image

Upvotes: 0

Views: 464

Answers (2)

Himanshu Dwivedi
Himanshu Dwivedi

Reputation: 8174

I think one of the smartest thing you can do is to use Rotation property

<Slider x:Name="slider"
        Maximum="360"
        Rotation="180"/>

It will start from Right to Left.

Upvotes: 4

Nikhil
Nikhil

Reputation: 3387

You can use the default slider but implement your logic in a reverse manner in ValueChanged Event. Also for the UI to Appear like its right to left you can set a dark colour MaximumTrackerColour and a light (white color) for MinimumTrackerColour.

Also you can use the ThumbImage as an icon "<" this will give a full look as it is right to left.

The only important point is that implementation of ValueChanged Event which should be in reverse manner.

Upvotes: 0

Related Questions