Class SfDateTimeRangeSlider
A material design for SfDateTimeRangeSlider.
Implements
Inherited Members
Namespace: Syncfusion.Maui.Sliders
Assembly: Syncfusion.Maui.Sliders.dll
Syntax
public class SfDateTimeRangeSlider : RangeSliderBase<DateTime>, IDrawableLayout, IDrawable, IAbsoluteLayout, ILayout, IView, IElement, ITransform, IContainer, IList<IView>, ICollection<IView>, IEnumerable<IView>, IEnumerable, ISafeAreaView, IPadding, ICrossPlatformLayout, IVisualTreeElement
Constructors
SfDateTimeRangeSlider()
Initializes a new instance of the SfDateTimeRangeSlider class.
Declaration
public SfDateTimeRangeSlider()
Fields
DateFormatProperty
The backing store for the Syncfusion.Maui.Sliders.IDateTimeElement.DateFormat field.
Declaration
public static readonly BindableProperty DateFormatProperty
Field Value
| Type | Description |
|---|---|
| BindableProperty | Microsoft.Maui.Controls.BindableProperty. |
IntervalTypeProperty
The backing store for the Syncfusion.Maui.Sliders.IDateTimeElement.IntervalType field.
Declaration
public static readonly BindableProperty IntervalTypeProperty
Field Value
| Type | Description |
|---|---|
| BindableProperty | Microsoft.Maui.Controls.BindableProperty. |
OrientationProperty
The backing store for the Syncfusion.Maui.Sliders.IOrientationElement.Orientation field.
Declaration
public static readonly BindableProperty OrientationProperty
Field Value
| Type | Description |
|---|---|
| BindableProperty | Microsoft.Maui.Controls.BindableProperty. |
StepDurationProperty
The backing store for the Syncfusion.Maui.Sliders.IDateTimeElement.StepDuration field.
Declaration
public static readonly BindableProperty StepDurationProperty
Field Value
| Type | Description |
|---|---|
| BindableProperty | Microsoft.Maui.Controls.BindableProperty. |
Properties
DateFormat
Gets or sets the value to format the date.
Declaration
public string DateFormat { get; set; }
Property Value
| Type | Description |
|---|---|
| string | Defaults to |
Examples
Snippet for SfDateTimeRangeSlider #XAML
<sliders:SfDateTimeRangeSlider Minimum = "2010-1-1"
Maximum = "2011-1-1"
RangeStart = "2010-4-1"
RangeEnd = "2010-9-1"
ShowLabels = "True"
DateFormat = "M yyyy" />
SfDateTimeRangeSlider rangeSlider = new SfDateTimeRangeSlider()
{
Minimum = new DateTime(2010, 1, 1),
Maximum = new DateTime(2011, 1, 1),
RangeStart = new DateTime(2010, 4, 1),
RangeEnd = new DateTime(2010, 9, 1),
ShowLabels = true,
DateFormat = "M yyyy"
};
IntervalType
Gets or sets the type of the date interval.
Declaration
public SliderDateIntervalType IntervalType { get; set; }
Property Value
| Type | Description |
|---|---|
| SliderDateIntervalType | Defaults to |
Examples
Snippet for SfDateTimeRangeSlider
<sliders:SfDateTimeRangeSlider Minimum = "2010-1-1"
Maximum = "2011-1-1"
Value = "2010-5-1"
IntervalType="Months"/>
Orientation
Gets or sets the orientation of the DateTime Range Slider.
If you set this property to Horizontal, the slider will be render from left to right. If you set this property to Vertical, the slider will be render from bottom to top.
Declaration
public SliderOrientation Orientation { get; set; }
Property Value
| Type | Description |
|---|---|
| SliderOrientation | Defaults to |
Examples
StepDuration
Gets or set the value indication whether to select the discrete date value.
For example, if Minimum is DateTime(2015, 01, 01) and Maximum is DateTime(2020, 01, 01) and StepDuration is SliderStepDuration(Years: 1, Months: 6), the slider will move the thumb at DateTime(2015, 01, 01), DateTime(2016, 07, 01), DateTime(2018, 01, 01),and DateTime(2019, 07, 01).
Declaration
public SliderStepDuration StepDuration { get; set; }
Property Value
| Type | Description |
|---|---|
| SliderStepDuration | Defaults to |
Remarks
StepDuration does not work with BetweenThumbs.
Examples
Snippet for SfDateTimeRangeSlider
<sliders:SfDateTimeRangeSlider Minimum="2010-01-01"
Maximum="2015-01-01"
RangeStart="2012-01-01"
RangeEnd="2016-01-01"
StepDuration="5">
</sliders:SfDateTimeRangeSlider>
Events
ValueChanged
Represents the ValueChanged event, which occurs when the user is done selecting a new value for the DateTime Range Slider.
Declaration
public event EventHandler<DateTimeRangeSliderValueChangedEventArgs>? ValueChanged
Event Type
| Type |
|---|
| EventHandler<DateTimeRangeSliderValueChangedEventArgs> |
Examples
ValueChanging
Represents the ValueChanging event, which occurs when the user is selecting a new value for the DateTime Range Slider by dragging any one of the thumb.
Declaration
public event EventHandler<DateTimeRangeSliderValueChangingEventArgs>? ValueChanging
Event Type
| Type |
|---|
| EventHandler<DateTimeRangeSliderValueChangingEventArgs> |