MAUI

  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class SfDateTimeSlider

    Show / Hide Table of Contents

    Class SfDateTimeSlider

    A material design for SfDateTimeSlider.

    Inheritance
    System.Object
    SfView
    RangeView<System.DateTime>
    SliderBase<System.DateTime>
    SfDateTimeSlider
    Implements
    IDrawableLayout
    Microsoft.Maui.Graphics.IDrawable
    Microsoft.Maui.IAbsoluteLayout
    Microsoft.Maui.ILayout
    Microsoft.Maui.IView
    Microsoft.Maui.IElement
    Microsoft.Maui.ITransform
    Microsoft.Maui.IContainer
    System.Collections.Generic.IList<Microsoft.Maui.IView>
    System.Collections.Generic.ICollection<Microsoft.Maui.IView>
    System.Collections.Generic.IEnumerable<Microsoft.Maui.IView>
    System.Collections.IEnumerable
    Microsoft.Maui.ISafeAreaView
    Microsoft.Maui.IPadding
    Microsoft.Maui.IVisualTreeElement
    IOrientationElement
    IDateTimeElement
    Inherited Members
    SliderBase<DateTime>.OrientationProperty
    SliderBase<DateTime>.ValueProperty
    SliderBase<DateTime>.ThumbIconProperty
    SliderBase<DateTime>.IOrientationElement.OnOrientationChanged(SliderOrientation)
    SliderBase<DateTime>.Orientation
    SliderBase<DateTime>.Value
    SliderBase<DateTime>.ThumbIcon
    RangeView<DateTime>.MinimumProperty
    RangeView<DateTime>.MaximumProperty
    RangeView<DateTime>.IntervalProperty
    RangeView<DateTime>.MinorTicksPerIntervalProperty
    RangeView<DateTime>.ShowTicksProperty
    RangeView<DateTime>.ShowLabelsProperty
    RangeView<DateTime>.ShowDividersProperty
    RangeView<DateTime>.IsInversedProperty
    RangeView<DateTime>.TrackExtentProperty
    RangeView<DateTime>.LabelsPlacementProperty
    RangeView<DateTime>.EdgeLabelsPlacementProperty
    RangeView<DateTime>.EnableDeferredUpdateProperty
    RangeView<DateTime>.DeferredUpdateDelayProperty
    RangeView<DateTime>.TrackStyleProperty
    RangeView<DateTime>.ThumbStyleProperty
    RangeView<DateTime>.ThumbOverlayStyleProperty
    RangeView<DateTime>.DividerStyleProperty
    RangeView<DateTime>.MajorTickStyleProperty
    RangeView<DateTime>.MinorTickStyleProperty
    RangeView<DateTime>.LabelStyleProperty
    RangeView<DateTime>.TooltipProperty
    RangeView<DateTime>.DragStartedCommandProperty
    RangeView<DateTime>.DragStartedCommandParameterProperty
    RangeView<DateTime>.DragCompletedCommandProperty
    RangeView<DateTime>.DragCompletedCommandParameterProperty
    RangeView<DateTime>.ChangeVisualState()
    RangeView<DateTime>.OnBindingContextChanged()
    RangeView<DateTime>.OnPropertyChanged(String)
    RangeView<DateTime>.OnHandlerChanged()
    RangeView<DateTime>.MeasureContent(Double, Double)
    RangeView<DateTime>.ArrangeContent(Rect)
    RangeView<DateTime>.OnDraw(ICanvas, RectF)
    RangeView<DateTime>.Minimum
    RangeView<DateTime>.Maximum
    RangeView<DateTime>.Interval
    RangeView<DateTime>.MinorTicksPerInterval
    RangeView<DateTime>.ShowDividers
    RangeView<DateTime>.ShowTicks
    RangeView<DateTime>.ShowLabels
    RangeView<DateTime>.IsInversed
    RangeView<DateTime>.TrackExtent
    RangeView<DateTime>.LabelsPlacement
    RangeView<DateTime>.EdgeLabelsPlacement
    RangeView<DateTime>.EnableDeferredUpdate
    RangeView<DateTime>.DeferredUpdateDelay
    RangeView<DateTime>.TrackStyle
    RangeView<DateTime>.ThumbStyle
    RangeView<DateTime>.ThumbOverlayStyle
    RangeView<DateTime>.DividerStyle
    RangeView<DateTime>.MajorTickStyle
    RangeView<DateTime>.MinorTickStyle
    RangeView<DateTime>.LabelStyle
    RangeView<DateTime>.Tooltip
    RangeView<DateTime>.DragStartedCommand
    RangeView<DateTime>.DragStartedCommandParameter
    RangeView<DateTime>.DragCompletedCommand
    RangeView<DateTime>.DragCompletedCommandParameter
    RangeView<DateTime>.ValueChangeStart
    RangeView<DateTime>.ValueChangeEnd
    RangeView<DateTime>.LabelCreated
    SfView.MeasureOverride(Double, Double)
    SfView.ArrangeOverride(Rect)
    SfView.OnMeasure(Double, Double)
    SfView.IDrawableLayout.InvalidateDrawable()
    SfView.Children
    SfView.ClipToBounds
    SfView.Padding
    SfView.IDrawableLayout.DrawingOrder
    Namespace: Syncfusion.Maui.Sliders
    Assembly: Syncfusion.Maui.Sliders.dll
    Syntax
    public class SfDateTimeSlider : SliderBase<DateTime>, IDrawableLayout, IDrawable, IAbsoluteLayout, ILayout, IView, IElement, ITransform, IContainer, IList<IView>, ICollection<IView>, IEnumerable<IView>, IEnumerable, ISafeAreaView, IPadding, IVisualTreeElement, ITouchListener, ITapGestureListener, IPanGestureListener, IGestureListener, IOrientationElement, IRangeView<DateTime>, IDateTimeElement

    Constructors

    SfDateTimeSlider()

    Initializes a new instance of the SfDateTimeSlider class.

    Declaration
    public SfDateTimeSlider()

    Fields

    DateFormatProperty

    The backing store for the DateFormat field.

    Declaration
    public static readonly BindableProperty DateFormatProperty
    Field Value
    Type Description
    Microsoft.Maui.Controls.BindableProperty

    Microsoft.Maui.Controls.BindableProperty.

    IntervalTypeProperty

    The backing store for the IntervalType field.

    Declaration
    public static readonly BindableProperty IntervalTypeProperty
    Field Value
    Type Description
    Microsoft.Maui.Controls.BindableProperty

    Microsoft.Maui.Controls.BindableProperty.

    StepDurationProperty

    The backing store for the StepDuration field.

    Declaration
    public static readonly BindableProperty StepDurationProperty
    Field Value
    Type Description
    Microsoft.Maui.Controls.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
    System.String

    Defaults to string.Empty.

    Examples

    #XAML

    <sliders:SfDateTimeSlider Minimum = "2010-1-1"
                              Maximum = "2011-1-1"
                              Value = "2010-4-1"
                              ShowLabels = "True"
                              DateFormat = "M yyyy" />
    • C#
    SfDateTimeSlider slider = new SfDateTimeSlider()
    {
        Minimum = new DateTime(2010, 1, 1),
        Maximum = new DateTime(2011, 1, 1),
        Value = new DateTime(2010, 4, 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 Auto.

    Examples
    • XAML
    • C#
    <sliders:SfDateTimeSlider Minimum = "2010-1-1" 
                              Maximum = "2011-1-1" 
                              Value = "2010-5-1" 
                              IntervalType="Months"/>
    SfDateTimeSlider slider = new SfDateTimeSlider()
    {
        Minimum = new DateTime(2010, 1, 1),
        Maximum = new DateTime(2011, 1, 1),
        Value = new DateTime(2010, 5, 1),
        IntervalType = SliderDateIntervalType.Months
    };

    StepDuration

    Gets or set the value indication whether to select the discrete date value.

    For example, if Minimum is System.DateTime(2015, 01, 01) and Maximum is System.DateTime(2020, 01, 01) and StepDuration is SliderStepDuration(Years: 1, Months: 6), the slider will move the thumb at System.DateTime(2015, 01, 01), System.DateTime(2016, 07, 01), System.DateTime(2018, 01, 01),and System.DateTime(2019, 07, 01).

    Declaration
    public SliderStepDuration StepDuration { get; set; }
    Property Value
    Type Description
    SliderStepDuration

    Defaults to default(SliderStepDuration).

    Remarks

    StepDuration does not work with BetweenThumbs.

    Examples
    • XAML
    <sliders:SfDateTimeSlider Minimum="2010-01-01"
                              Maximum="2015-01-01"
                              Value="2012-01-01"
                              StepDuration="5">
    </sliders:SfDateTimeSlider>

    Events

    ValueChanged

    Represents the ValueChanged event, which occurs when the user is done selecting a new value for the DateTime slider.

    Declaration
    public event EventHandler<DateTimeSliderValueChangedEventArgs> ValueChanged
    Event Type
    Type Description
    System.EventHandler<DateTimeSliderValueChangedEventArgs>
    Examples
    • XAML
    • C#
    <sliders:SfDateTimeSlider ValueChanged="OnValueChanged" />
    SfDateTimeSlider slider = new SfDateTimeSlider()
    {
        ValueChanged += OnValueChanged
    }
    
    private void OnValueChanged(object sender, DateTimeSliderValueChangedEventArgs e)
    {
    }

    ValueChanging

    Represents the ValueChanging event, which occurs when the user is selecting a new value for the DateTime slider by dragging the thumb.

    Declaration
    public event EventHandler<DateTimeSliderValueChangingEventArgs> ValueChanging
    Event Type
    Type Description
    System.EventHandler<DateTimeSliderValueChangingEventArgs>
    Examples
    • XAML
    • C#
    <sliders:SfDateTimeSlider ValueChanging="OnValueChanging" />
    SfDateTimeSlider slider = new SfDateTimeSlider()
    {
        ValueChanging += OnValueChanging
    }
    
    private void OnValueChanging(object sender, DateTimeSliderValueChangingEventArgs e)
    {
    }

    Explicit Interface Implementations

    IDateTimeElement.OnDateFormatChanged(String, String)

    Declaration
    void IDateTimeElement.OnDateFormatChanged(string oldValue, string newValue)
    Parameters
    Type Name Description
    System.String oldValue
    System.String newValue

    IDateTimeElement.OnIntervalTypeChanged(SliderDateIntervalType, SliderDateIntervalType)

    Declaration
    void IDateTimeElement.OnIntervalTypeChanged(SliderDateIntervalType oldValue, SliderDateIntervalType newValue)
    Parameters
    Type Name Description
    SliderDateIntervalType oldValue
    SliderDateIntervalType newValue

    IDateTimeElement.OnStepChanged()

    Declaration
    void IDateTimeElement.OnStepChanged()

    Implements

    IDrawableLayout
    Microsoft.Maui.Graphics.IDrawable
    Microsoft.Maui.IAbsoluteLayout
    Microsoft.Maui.ILayout
    Microsoft.Maui.IView
    Microsoft.Maui.IElement
    Microsoft.Maui.ITransform
    Microsoft.Maui.IContainer
    System.Collections.Generic.IList<>
    System.Collections.Generic.ICollection<>
    System.Collections.Generic.IEnumerable<>
    System.Collections.IEnumerable
    Microsoft.Maui.ISafeAreaView
    Microsoft.Maui.IPadding
    Microsoft.Maui.IVisualTreeElement
    IOrientationElement
    IDateTimeElement
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved