menu

WPF

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class SfTimePicker - WPF API Reference | Syncfusion

    Show / Hide Table of Contents

    Class SfTimePicker

    Represents a control that allows the user to select a time by using a drop-down Syncfusion.UI.Xaml.Controls.Input.TimeSelector control

    Inheritance
    System.Object
    SfTimePicker
    Implements
    IDataValidator
    System.IDisposable
    Namespace: Syncfusion.Windows.Controls.Input
    Assembly: Syncfusion.SfInput.Wpf.dll
    Syntax
    public class SfTimePicker : Control, IDataValidator, IDisposable
    Remarks

    Constructors

    SfTimePicker()

    Initializes a new instance of the Syncfusion.UI.Xaml.Controls.Input.TimePicker class.

    Declaration
    public SfTimePicker()

    Fields

    AccentBrushProperty

    Using a DependencyProperty as the backing store for AccentBrush. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty AccentBrushProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    AllowInlineEditingProperty

    Using a DependencyProperty as the backing store for CanInlineEdit. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty AllowInlineEditingProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    AllowNullProperty

    Using a DependencyProperty as the backing store for AllowNull. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty AllowNullProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    AutoForwardingProperty

    Using a DependencyProperty as the backing store for AutoForwarding. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty AutoForwardingProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    DropDownHeightProperty

    Using a DependencyProperty as the backing store for DropDownHeight. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty DropDownHeightProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    FormatStringProperty

    Using a DependencyProperty as the backing store for FormatString. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty FormatStringProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    InputScopeProperty

    Using a DependencyProperty as the backing store for InputScope. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty InputScopeProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    IsDropDownOpenProperty

    Using a DependencyProperty as the backing store for IsDropDownOpen. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty IsDropDownOpenProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    MaxTimeProperty

    Declaration
    public static readonly DependencyProperty MaxTimeProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    MinTimeProperty

    Declaration
    public static readonly DependencyProperty MinTimeProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    SelectorFormatStringProperty

    Using a DependencyProperty as the backing store for ValueFormat. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty SelectorFormatStringProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    SelectorItemCountProperty

    Using a DependencyProperty as the backing store for SelectorItemCount. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty SelectorItemCountProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    SelectorItemHeightProperty

    Using a DependencyProperty as the backing store for SelectorItemHeight. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty SelectorItemHeightProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    SelectorItemSpacingProperty

    Using a DependencyProperty as the backing store for SelectorItemSpacing. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty SelectorItemSpacingProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    SelectorItemWidthProperty

    Using a DependencyProperty as the backing store for SelectorItemWidth. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty SelectorItemWidthProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    SelectorStyleProperty

    Using a DependencyProperty as the backing store for SelectorStyle. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty SelectorStyleProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    SetValueOnLostFocusProperty

    Using a DependencyProperty as the backing store for SetValueOnLostFocus. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty SetValueOnLostFocusProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    ShowDropDownButtonProperty

    Using a DependencyProperty as the backing store for ShowDropDownButton. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty ShowDropDownButtonProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    ValueProperty

    Using a DependencyProperty as the backing store for SelectedDateTime. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty ValueProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    WatermarkProperty

    Using a DependencyProperty as the backing store for Watermark. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty WatermarkProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    WatermarkTemplateProperty

    Using a DependencyProperty as the backing store for WatermarkTemplate. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty WatermarkTemplateProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    Properties

    AccentBrush

    Gets or sets the background for Syncfusion.UI.Xaml.Controls.Input.TimePicker.

    Declaration
    public Brush AccentBrush { get; set; }
    Property Value
    Type Description
    System.Windows.Media.Brush

    The default value is null.

    See Also
    Syncfusion.UI.Xaml.Controls.Input.TimeSelector

    AllowInlineEditing

    Gets or sets a value indicating whether AllowInlineEditing is set in Syncfusion.UI.Xaml.Controls.Input.TimePicker control.

    Declaration
    public bool AllowInlineEditing { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if set; otherwise, false.

    See Also
    Syncfusion.UI.Xaml.Controls.Input.TimeSelector

    AllowNull

    Gets or sets the AllowNull for the Syncfusion.UI.Xaml.Controls.Input.SfTimePicker control.

    Declaration
    public bool AllowNull { get; set; }
    Property Value
    Type
    System.Boolean

    AutoForwarding

    Declaration
    public bool AutoForwarding { get; set; }
    Property Value
    Type
    System.Boolean

    DropDownHeight

    Gets or sets the height of the drop down for the Syncfusion.UI.Xaml.Controls.Input.TimePicker.

    Declaration
    public double DropDownHeight { get; set; }
    Property Value
    Type Description
    System.Double

    The default value is zero.

    See Also
    Syncfusion.UI.Xaml.Controls.Input.TimePicker.DropDownWidth
    Syncfusion.UI.Xaml.Controls.Input.TimePicker.IsDropDownOpen
    Syncfusion.UI.Xaml.Controls.Input.TimeSelector

    FormatString

    Gets or sets the data that is used as a format for Syncfusion.UI.Xaml.Controls.Input.TimePicker.

    Declaration
    public string FormatString { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null.

    See Also
    Syncfusion.UI.Xaml.Controls.Input.TimeSelector

    InputScope

    Gets or sets the input scope

    Declaration
    public InputScopeNameValue InputScope { get; set; }
    Property Value
    Type
    System.Windows.Input.InputScopeNameValue

    IsDropDownOpen

    Gets or sets a value indicating whether this instance is drop down open.

    Declaration
    public bool IsDropDownOpen { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if this instance is drop down open; otherwise, false.

    See Also
    Syncfusion.UI.Xaml.Controls.Input.TimePicker.DropDownWidth
    Syncfusion.UI.Xaml.Controls.Input.TimePicker.DropDownHeight

    MaxTime

    Gets or sets the Maximum Time to be listed in the Syncfusion.UI.Xaml.Controls.Input.TimePicker control.

    Declaration
    public TimeSpan MaxTime { get; set; }
    Property Value
    Type Description
    System.TimeSpan

    The default value is new TimeSpan(23,59,59)

    MinTime

    Gets or sets the Minimum Time to be listed in the Syncfusion.UI.Xaml.Controls.Input.TimePicker control.

    Declaration
    public TimeSpan MinTime { get; set; }
    Property Value
    Type Description
    System.TimeSpan

    The default value is new TimeSpan(00,00,00)

    SelectorFormatString

    Gets or sets the SelectorFormatString

    Declaration
    public object SelectorFormatString { get; set; }
    Property Value
    Type
    System.Object

    SelectorItemCount

    Gets or sets the SelectorItemCount for the time selector items

    Declaration
    public int SelectorItemCount { get; set; }
    Property Value
    Type Description
    System.Int32

    The default value is 0

    SelectorItemHeight

    Gets or sets the SelectorItemHeight for the time selector items

    Declaration
    public double SelectorItemHeight { get; set; }
    Property Value
    Type Description
    System.Double

    The default value is 30

    SelectorItemSpacing

    Gets or sets the SelectorItemSpacing for the time selector items

    Declaration
    public double SelectorItemSpacing { get; set; }
    Property Value
    Type Description
    System.Double

    The default value is 4

    SelectorItemWidth

    Gets or sets the SelectorItemWidth for the time selector items

    Declaration
    public double SelectorItemWidth { get; set; }
    Property Value
    Type Description
    System.Double

    The default value is 30

    SelectorStyle

    Gets or sets the style that apply for the Syncfusion.UI.Xaml.Controls.Input.TimeSelector.

    Declaration
    public Style SelectorStyle { get; set; }
    Property Value
    Type Description
    System.Windows.Style

    The default value is null

    SetValueOnLostFocus

    Gets or sets a value indicating whether set Syncfusion.UI.Xaml.Controls.Input.TimePicker.Value on lost focus.

    Declaration
    public bool SetValueOnLostFocus { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if set value on lost focus; otherwise, false.

    See Also
    Syncfusion.UI.Xaml.Controls.Input.TimeSelector

    ShowDropDownButton

    Gets or sets a value indicating whether ShowDropDownButton is set in Syncfusion.UI.Xaml.Controls.Input.TimePicker control.

    Declaration
    public bool ShowDropDownButton { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if set; otherwise, false.

    See Also
    Syncfusion.UI.Xaml.Controls.Input.TimeSelector

    Value

    Gets or sets the value of the Syncfusion.UI.Xaml.Controls.Input.TimePicker that hold the currently selected time.

    Declaration
    public DateTime? Value { get; set; }
    Property Value
    Type Description
    System.Nullable<System.DateTime>

    The default value is System.DateTime.Now.

    See Also
    Syncfusion.UI.Xaml.Controls.Input.TimePicker.SetValueOnLostFocus
    Syncfusion.UI.Xaml.Controls.Input.TimeSelector

    Watermark

    Gets or sets the WaterMark property

    Declaration
    public object Watermark { get; set; }
    Property Value
    Type Description
    System.Object

    The default value is null

    WatermarkTemplate

    Gets or sets a template for the WaterMark property

    Declaration
    public DataTemplate WatermarkTemplate { get; set; }
    Property Value
    Type Description
    System.Windows.DataTemplate

    The default value is null

    Methods

    Dispose()

    Unhooks all the events that are hooked

    Declaration
    public void Dispose()

    OnAllowInlineEditing(DependencyPropertyChangedEventArgs)

    Occurs when AllowInlineEditing is set in Syncfusion.UI.Xaml.Controls.Input.TimePicker control.

    Declaration
    protected virtual void OnAllowInlineEditing(DependencyPropertyChangedEventArgs args)
    Parameters
    Type Name Description
    System.Windows.DependencyPropertyChangedEventArgs args
    See Also
    Syncfusion.UI.Xaml.Controls.Input.TimeSelector

    OnApplyTemplate()

    Initializes all te child elements of the Syncfusion.UI.Xaml.Controls.Input.TimePicker control.

    Declaration
    public override void OnApplyTemplate()

    OnFormatStringChanged(DependencyPropertyChangedEventArgs)

    Occurs when FormatString is set in Syncfusion.UI.Xaml.Controls.Input.TimePicker control.

    Declaration
    protected virtual void OnFormatStringChanged(DependencyPropertyChangedEventArgs args)
    Parameters
    Type Name Description
    System.Windows.DependencyPropertyChangedEventArgs args
    See Also
    Syncfusion.UI.Xaml.Controls.Input.TimeSelector

    OnIsDropDownOpenChanged(DependencyPropertyChangedEventArgs)

    Occurs when IsDropDownOpen is set in Syncfusion.UI.Xaml.Controls.Input.TimePicker control.

    Declaration
    protected virtual void OnIsDropDownOpenChanged(DependencyPropertyChangedEventArgs args)
    Parameters
    Type Name Description
    System.Windows.DependencyPropertyChangedEventArgs args
    See Also
    Syncfusion.UI.Xaml.Controls.Input.TimeSelector

    OnKeyDown(KeyEventArgs)

    Invoked when a key is pressed.

    Declaration
    protected override void OnKeyDown(KeyEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.KeyEventArgs e

    OnMouseLeftButtonUp(MouseButtonEventArgs)

    Invoked when the pointer is released.

    Declaration
    protected override void OnMouseLeftButtonUp(MouseButtonEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.MouseButtonEventArgs e

    OnMouseWheel(MouseWheelEventArgs)

    Invoked when an unhandled System.Windows.Input.Mouse.PreviewMouseWheel attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.

    Declaration
    protected override void OnMouseWheel(MouseWheelEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.MouseWheelEventArgs e

    The System.Windows.Input.MouseWheelEventArgs that contains the event data.

    OnPreviewMouseLeftButtonDown(MouseButtonEventArgs)

    Occurs when the left mouse button is pressed while the mouse pointer is over the element.

    Declaration
    protected override void OnPreviewMouseLeftButtonDown(MouseButtonEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.MouseButtonEventArgs e

    OnSelectorFormatStringChanged(DependencyPropertyChangedEventArgs)

    Occurs when SelectorFormatString is set in Syncfusion.UI.Xaml.Controls.Input.TimePicker control.

    Declaration
    protected virtual void OnSelectorFormatStringChanged(DependencyPropertyChangedEventArgs args)
    Parameters
    Type Name Description
    System.Windows.DependencyPropertyChangedEventArgs args
    See Also
    Syncfusion.UI.Xaml.Controls.Input.TimeSelector

    Validate(ValidationEventArgs)

    /// Validates the states Syncfusion.UI.Xaml.Controls.Input.VisualStates

    Declaration
    [Obsolete("Method will not help due to internal arhitecture changes")]
    public void Validate(ValidationEventArgs args)
    Parameters
    Type Name Description
    System.Xml.Schema.ValidationEventArgs args

    Events

    ValueChanged

    Occurs when the value for Syncfusion.UI.Xaml.Controls.Input.TimePicker changed.

    Declaration
    public event PropertyChangedCallback ValueChanged
    Event Type
    Type
    System.Windows.PropertyChangedCallback
    See Also
    Syncfusion.UI.Xaml.Controls.Input.TimePicker.Value

    Implements

    IDataValidator
    System.IDisposable
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved