Migrate from Xamarin.Forms SfRangeSlider to .NET MAUI SfRangeSlider

30 Sep 20222 minutes to read

To migrate from the Xamarin Range Slider control to MAUI, use the following two controls.

  1. SfDateTimeRangeSlider – For date-time scale.
  2. SfRangeSlider – For numeric scale.

One more thing is, in .NET MAUI SfRangeSlider, you do not have an API name ShowRange in MAUI. Both the MAUI SfDateTimeRangeSlider and SfRangeSlider controls will show two thumbs by default. If you wish to use the single thumb, check the Migration from Xamarin.Forms SfRangeSlider to .NET MAUI SfSlider.

Namespaces

Xamarin SfRangeSlider .NET MAUI SfRangeSlider
Syncfusion.SfRangeSlider.XForms Syncfusion.Maui.Sliders

Properties

Track

Xamarin SfRangeSlider .NET MAUI SfRangeSlider Description

TrackColor

SliderTrackStyle.InactiveFill

Gets or sets the brush for the inactive track in the SfSlider.

TrackSelectionColor

SliderTrackStyle.ActiveFill

Gets or sets the brush for the active track in the SfSlider.

TrackThickness

SliderTrackStyle.InactiveSize

Gets or sets the size for the inactive track in the SfSlider.

TrackSelectionThickness

SliderTrackStyle.ActiveSize

Gets or sets the size for the active track in the SfSlider.

Thumb

Xamarin SfRangeSlider .NET MAUI SfRangeSlider Description

ThumbSize

SliderThumbStyle.Radius

Gets or sets the radius for the thumb in the SfSlider.

KnobColor

SliderThumbStyle.Fill

Gets or sets the color for the thumb in the SfSlider.

ThumbBorderColor

SliderThumbStyle.Stroke

Gets or sets the stroke color for the thumb in the SfSlider.

ThumbBorderThickness

SliderThumbStyle.StrokeThickness

Gets or sets the stroke value for the thumb in the SfSlider.

Ticks

Xamarin SfRangeSlider .NET MAUI SfRangeSlider Description

TickColor


SliderTickStyle.InactiveFill

Gets or sets the brush for the inactive ticks in the SfSlider.

SliderTickStyle.ActiveFill

Gets or sets the brush for the active ticks in the SfSlider.

Labels

Xamarin SfRangeSlider .NET MAUI SfRangeSlider Description

AllowDragRange

ShowLabels

Gets or sets a value indicating whether to show or hide the labels.

LabelColor


SliderLabelStyle.InactiveTextColor

Gets or sets the color for the inactive labels in the SfSlider.

SliderLabelStyle.ActiveTextColor

Gets or sets the color for the active labels in the SfSlider.

FontFamily


SliderLabelStyle.InactiveFontFamily

Gets or sets the font family for the inactive labels in the SfSlider.

SliderLabelStyle.ActiveFontFamily

Gets or sets the font family for the active labels in the SfSlider.

FontAttribute


SliderLabelStyle.InactiveFontAttributes

Gets or sets the font attributes for the inactive labels in the SfSlider.

SliderLabelStyle.ActiveFontAttributes

Gets or sets the font attributes for the active labels in the SfSlider.

FontSize


SliderLabelStyle.InactiveFontSize

Gets or sets the size for the inactive fonts in the SfSlider.

SliderLabelStyle.ActiveFontSize

Gets or sets the size for the active fonts in the SfSlider.

LabelFormat

NumberFormat

Gets or sets the value to format the label text.

Tooltip

Xamarin SfRangeSlider .NET MAUI SfRangeSlider Description

TooltipBackgroundColor

SliderTooltip.Fill

Gets or sets the brush for the tooltip in the SfSlider.

TooltipTextColor

SliderTooltip.TextColor

Gets or sets the color for the tooltip text in the SfSlider.

TooltipPrecision

SliderTooltip.NumberFormat

Gets or sets the value to format the label text in the SfSlider.

DragMode

Xamarin SfRangeSlider .NET MAUI SfRangeSlider Description

AllowDragRange

DragBehavior

Gets or sets the value which indicates the behavior of the thumb dragging.

Step

Xamarin SfRangeSlider .NET MAUI SfRangeSlider Description

SnapsTo

StepSize

Gets or sets the value indicating whether to select the discrete value.

Events

Xamarin SfRangeSlider .NET MAUI SfRangeSlider Description

DragStarted

ValueChangeStart

Occurs when the user selects a new value for the Slider by tapping/mouse down on the thumb.

RangeChanging

ValueChanging

Occurs when the user selects a new value for the Range Slider by dragging any one of the thumbs.

DragCompleted

ValueChangeEnd

Occurs when the user completes selecting a new value for the Slider by tapping/mouse down on the thumb.