Selection Value configuration in Xamarin Range Slider (SfRangeSlider)
11 Aug 20222 minutes to read
Various customization options are available to configure the selection value in SfRangeSlider.
Set Minimum Value
Gets or sets the minimum possible value of the range. The thumb could not move beyond that value.
<range:SfRangeSlider x:Name="rangeslider" Minimum="0"/>rangeSlider.Minimum=0;Set Maximum Value
Gets or sets the maximum possible value of the range. The thumb could not move after that value.
<range:SfRangeSlider x:Name="rangeslider" Maximum="24"/>rangeSlider.Maximum=24;Set Tick Frequency
The TickFrequency property is used to decide the number of ticks to be displayed along the track based on Minimum and Maximum values.
<range:SfRangeSlider x:Name="rangeslider" TickFrequency="4" />rangeSlider.TickFrequency=4;NOTE
When the
SnapsToproperty is set toTicks, theTickFrequencyis used to specify the interval between snap points.
Set Interval between Snap Points.
The StepFrequency property is used to specify the interval between snap points.
<range:SfRangeSlider x:Name="rangeslider" StepFrequency="4"/>rangeSlider.StepFrequency=4;NOTE
When the
SnapsToproperty is set toStepValues, theStepFrequencyproperty is enabled.
Set Snapping Mode
The SnapsTo` property determines whether the RangeSlider snaps to steps or ticks. Available options for this property are
-
StepValues- TheStepFrequencyproperty will be used to specify the interval between snap points. -
Ticks- TheTickFrequencyproperty will be used to specify the interval between snap points -
None- The thumb is moved independent of any values.
NOTE
The default option is
Ticks.
<range:SfRangeSlider x:Name="rangeslider" SnapsTo="Ticks"/>rangeSlider.SnapsTo=SnapsTo.Ticks;