Class SfSlider
A material design for SfSlider.
Implements
Inherited Members
Namespace: Syncfusion.Maui.Sliders
Assembly: Syncfusion.Maui.Sliders.dll
Syntax
public class SfSlider : SliderBase<double>, IDrawableLayout, IDrawable, IAbsoluteLayout, ILayout, IView, IElement, ITransform, IContainer, IList<IView>, ICollection<IView>, IEnumerable<IView>, IEnumerable, ISafeAreaView, IPadding, ICrossPlatformLayout, IVisualTreeElement, ISemanticsProvider, ITouchListener, ITapGestureListener, IPanGestureListener, IGestureListener, IInteractionState, IOrientationElement, IRangeView<double>, INumericElement, IParentThemeElement, IThemeElement
Constructors
SfSlider()
Initializes a new instance of the SfSlider class.
Declaration
public SfSlider()
Fields
NumberFormatProperty
The backing store for the NumberFormat field.
Declaration
public static readonly BindableProperty NumberFormatProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | Microsoft.Maui.Controls.BindableProperty. |
StepSizeProperty
The backing store for the StepSize field.
Declaration
public static readonly BindableProperty StepSizeProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | Microsoft.Maui.Controls.BindableProperty. |
Properties
NumberFormat
Gets or sets the value to format the label text.
Declaration
public string NumberFormat { get; set; }
Property Value
Type | Description |
---|---|
System.String | Defaults to |
Examples
StepSize
Gets or sets the value indicating whether to select the discrete value.
For example, if Minimum is 0.0 and Maximum is 10.0 and StepSize is 2.0, then the slider will move the thumb positions to 0.0, 2.0, 4.0, 6.0, 8.0 and 10.0 only.
Declaration
public double StepSize { get; set; }
Property Value
Type | Description |
---|---|
System.Double | Defaults to |
Remarks
StepSize does not work with BetweenThumbs.
Examples
Snippet for SfSlider
Events
ValueChanged
Represents the ValueChanged event, which occurs when the user is done selecting a new value for the slider.
Declaration
public event EventHandler<SliderValueChangedEventArgs> ValueChanged
Event Type
Type |
---|
System.EventHandler<SliderValueChangedEventArgs> |
Examples
ValueChanging
Represents the ValueChanging event, which occurs when the user is selecting a new value for the Slider by dragging the thumb.
Declaration
public event EventHandler<SliderValueChangingEventArgs> ValueChanging
Event Type
Type |
---|
System.EventHandler<SliderValueChangingEventArgs> |
Examples
Explicit Interface Implementations
INumericElement.OnNumberFormatChanged(String, String)
Declaration
void INumericElement.OnNumberFormatChanged(string oldValue, string newValue)
Parameters
Type | Name | Description |
---|---|---|
System.String | oldValue | |
System.String | newValue |
INumericElement.OnStepChanged()
Declaration
void INumericElement.OnStepChanged()