Skip to content

Apptracktive/xamarin-range-slider

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

95 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build status

Xamarin.RangeSlider

With Xamarin.RangeSlider you can pick ranges in Xamarin and Xamarin.Forms (Android, iOS, UWP, Win8 supported). Project is based on https://github.com/anothem/android-range-seek-bar (Android) and on https://github.com/muZZkat/NMRangeSlider (iOS).

You can find NuGet packages here. Version without Xamarin.Forms support is available here.

Supported Properties

Name Description Remarks
LowerValue Current lower value Two way binding
UpperValue Current upper value Two way binding
MinimumValue Maximum value
MaximumValue Minimu value
MinThumbHidden If true lower handle is hidden
MaxThumbHidden If true upper handle is hidden
StepValue Minimal difference between two consecutive values
StepValueContinuously If false the slider will move freely with the tounch. When the touch ends, the value will snap to the nearest step value. If true the slider will stay in its current position until it reaches a new step value.
BarHeight Height of the slider bar Not supported on iOS
ShowTextAboveThumbs Show current values above the thumbs
TextSize Text above the thumbs size dp on Android, points on iOS, pixels on UWP
TextFormat Format string for text above the thumbs

Supported Events

Name Description
DragStarted User started moving one of the thumbs to changenge value
DragCompleted Thumb has been released

Supported Delegates

Name Description
FormatLabel Provide custom formatting for text above thumbs

Screenshots

Android iOS UWP
Android iOS UWP

Samples

Sample project.

XAML initialization

<forms:RangeSlider x:Name="RangeSlider" MinimumValue="1" MaximumValue="100" LowerValue="1" UpperValue="100" StepValue="0" StepValueContinuously="False" VerticalOptions="Center" TextSize="15" />

Displaying dates

public MainPage()
{
    InitializeComponent();
    RangeSlider.FormatLabel = FormaLabel;
}

private string FormaLabel(Thumb thumb, float val)
{
    return DateTime.Today.AddDays(val).ToString("d");
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 94.6%
  • PowerShell 3.6%
  • Shell 1.8%