Interface INumericElement
Numeric elements
Namespace: Syncfusion.Maui.Sliders
Assembly: Syncfusion.Maui.Sliders.dll
Syntax
public interface INumericElement
Properties
LabelTemplate
Gets or sets the Microsoft.Maui.Controls.DataTemplate used to customize the visual representation of labels displayed in the slider.
Declaration
DataTemplate LabelTemplate { get; set; }
Property Value
| Type | Description |
|---|---|
| Microsoft.Maui.Controls.DataTemplate | A Microsoft.Maui.Controls.DataTemplate that defines the visual representation of each slider label. |
NumberFormat
Gets or sets the value to format the label text.
Declaration
string NumberFormat { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String | Defaults to |
Examples
Snippet for SfSlider
Snippet for SfRangeSlider
Snippet for SfRangeSelector
StepSize
Gets or sets the value indicating whether to select the discrete value.
StepSize doesnt work with BetweenThumbs.
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
double StepSize { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Double | Defaults to |
Examples
Snippet for SfSlider
Snippet for SfRangeSlider
Snippet for SfRangeSelector
<sliders:SfRangeSelector Minimum="0"
Maximum="10"
StepSize="0.2">
</sliders:SfRangeSelector>
Methods
OnLabelTemplateChanged()
Called when the label template has changed.
Declaration
void OnLabelTemplateChanged()
OnNumberFormatChanged(String, String)
Call when the number format has changed.
Declaration
void OnNumberFormatChanged(string oldValue, string newValue)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | oldValue | |
| System.String | newValue |
OnStepChanged()
Call when the step size has changed.
Declaration
void OnStepChanged()