Xamarin Forms Range Slider

Hello friends. In this article, we will talk about using Xamarin Forms and Range Slider. First of all, let’s talk about what Range Slider is. Range Slider is actually a slider structure that can be changed by 2 pieces. This allows us to specify a specific range instead of actually expecting an integer from the user. For example, we will want to enter the weight range, rather than entering the entrances in terms of design rather than a nice way to use the Range Slider would be better for us.

To use Range Slider, we need to install a Nuget package. This package is open source and can be viewed here. Package name: Xamarin.Forms.RangeSlider.

You are adding it to your project in Nuget Package

Android and iOS after adding the process we have to do. There is a bit of problem in the iOS layer at the moment, in order to overcome them, you need to paste the following code snippet into the App Delegate class in the iOS layer.

Then we have to paste the following code snippet into the FinishedLaunching function in this class.

It doesn’t stop there. As I said in the 0.8.1 version, the project works very stable for Android, while it is a bit problematic for iOS. You will need to download the source code from the above.

Then we can use it in the Portable layer. First I’ll add it to the header to see it on the xaml side. Then I start to design. First of all, I have to give the minimum and maximum values. So the user should choose between these values. After that, with Step Value feature, I specify that it will increase. maybe it’s up to you. If there is an occasional number, you can take it to the nearest number with the stepCalueContinuosly feature. Then there are the design sections for you. Colors, text colors, whether or not the text appears.

When we run the project, there is a screenshot like below.

 

If you have questions, you can reach us by e-mail or comment.

 

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.