skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • AI Coding Assistants
    • Embedded Reporting
    • Document Processing Libraries
    • SSO Account Sign-in

    Web

    Kendo UI UI for Angular UI for Vue UI for jQuery KendoReact UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Telerik JustMock

    CMS

    Sitefinity

    AI Productivity Tools

    AI Coding Assistants

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    KendoReact Free VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Virtual Classroom
    • Forums
    • Videos
    • Blogs
    • Accessibility
    • Submit a Ticket

    Productivity and Design Tools

    • Visual Studio Extensions
    • Visual Studio Templates
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class RadTimeSpanPicker

Represents a RadTimeSpanPicker control that allows users to select a TimeSpan value. The control provides both direct text input and popup selection interfaces for editing TimeSpan values.

Inheritance
System.Object
RadControl
RadEditorControl
RadTimeSpanPicker
Inherited Members
RadEditorControl.OnParentChanged(EventArgs)
RadEditorControl.GetPreferredSize(Size)
RadEditorControl.GetRootElementDesiredSize(Int32, Int32, Int32, Int32)
RadEditorControl.SetBoundsCore(Int32, Int32, Int32, Int32, BoundsSpecified)
RadEditorControl.ImageList
RadControl.isResizing2
RadControl.isDisposing2
RadControl.invalidResizeRect
RadControl.isAccessibilityRequested
RadControl.Construct()
RadControl.CreateBehavior()
RadControl.CreateRootElement()
RadControl.InitializeRootElement(RootRadElement)
RadControl.LoadElementTree()
RadControl.LoadElementTree(Size)
RadControl.SetIsInitializing(Boolean)
RadControl.ShouldSerializeBackColor()
RadControl.ShouldSerializeForeColor()
RadControl.ShouldSerializeFont()
RadControl.OnKeyDown(KeyEventArgs)
RadControl.OnKeyUp(KeyEventArgs)
RadControl.OnPreviewKeyDown(PreviewKeyDownEventArgs)
RadControl.OnKeyPress(KeyPressEventArgs)
RadControl.OnClick(EventArgs)
RadControl.OnDoubleClick(EventArgs)
RadControl.OnMouseDown(MouseEventArgs)
RadControl.OnMouseUp(MouseEventArgs)
RadControl.OnMouseEnter(EventArgs)
RadControl.OnMouseLeave(EventArgs)
RadControl.OnMouseMove(MouseEventArgs)
RadControl.OnMouseHover(EventArgs)
RadControl.OnMouseWheel(MouseEventArgs)
RadControl.OnMouseCaptureChanged(EventArgs)
RadControl.OnGotFocus(EventArgs)
RadControl.OnLostFocus(EventArgs)
RadControl.OnCreateControl()
RadControl.OnHandleDestroyed(EventArgs)
RadControl.OnVisibleChanged(EventArgs)
RadControl.OnFontChanged(EventArgs)
RadControl.OnForeColorChanged(EventArgs)
RadControl.OnBackColorChanged(EventArgs)
RadControl.OnEnabledChanged(EventArgs)
RadControl.OnBindingContextChanged(EventArgs)
RadControl.OnLocationChanged(EventArgs)
RadControl.OnPaddingChanged(EventArgs)
RadControl.OnPaint(PaintEventArgs)
RadControl.OnLayout(LayoutEventArgs)
RadControl.OnAutoSizeChanged(EventArgs)
RadControl.OnInvalidated(RadElement)
RadControl.OnLoad(Size)
RadControl.OnCaptureLosing()
RadControl.OnThemeChanged()
RadControl.OnToolTipTextNeeded(Object, ToolTipTextNeededEventArgs)
RadControl.OnScreenTipNeeded(Object, ScreenTipNeededEventArgs)
RadControl.OnThemeNameChanged(ThemeNameChangedEventArgs)
RadControl.ProcessMnemonic(Char)
RadControl.ProcessFocusRequested(RadElement)
RadControl.ProcessCaptureChangeRequested(RadElement, Boolean)
RadControl.CallOnMouseCaptureChanged(EventArgs)
RadControl.CallBaseOnGotFocus(EventArgs)
RadControl.CallBaseOnLostFocus(EventArgs)
RadControl.CallOnToolTipTextNeeded(Object, ToolTipTextNeededEventArgs)
RadControl.CallOnScreenTipNeeded(Object, ScreenTipNeededEventArgs)
RadControl.CallOnMouseUp(MouseEventArgs)
RadControl.CallOnMouseDown(MouseEventArgs)
RadControl.CallOnClick(EventArgs)
RadControl.CallOnDoubleClick(EventArgs)
RadControl.CallOnMouseEnter(EventArgs)
RadControl.CallOnMouseWheel(MouseEventArgs)
RadControl.CallOnMouseLeave(EventArgs)
RadControl.CallOnMouseMove(MouseEventArgs)
RadControl.CallOnMouseHover(EventArgs)
RadControl.CallOnPreviewKeyDown(PreviewKeyDownEventArgs)
RadControl.CallBaseOnKeyDown(KeyEventArgs)
RadControl.CallOnKeyDown(KeyEventArgs)
RadControl.CallBaseOnKeyPress(KeyPressEventArgs)
RadControl.CallOnKeyPress(KeyPressEventArgs)
RadControl.IsInputKey(Keys)
RadControl.GetInputElement()
RadControl.CallBaseOnKeyUp(KeyEventArgs)
RadControl.CallOnKeyUp(KeyEventArgs)
RadControl.CallOnThemeNameChanged(ThemeNameChangedEventArgs)
RadControl.CallOnVisibleChanged(EventArgs)
RadControl.BeginInit()
RadControl.EndInit()
RadControl.OnNotifyPropertyChanged(String)
RadControl.OnNotifyPropertyChanged(PropertyChangedEventArgs)
RadControl.IComponentTreeHandler.GetShowFocusCues()
RadControl.IComponentTreeHandler.CreateRootElement()
RadControl.IComponentTreeHandler.CreateChildItems(RadElement)
RadControl.IComponentTreeHandler.InitializeRootElement(RootRadElement)
RadControl.IComponentTreeHandler.InvalidateElement(RadElement)
RadControl.IComponentTreeHandler.InvalidateElement(RadElement, Rectangle)
RadControl.IComponentTreeHandler.InvalidateIfNotSuspended()
RadControl.IComponentTreeHandler.GetAmbientPropertyValue(RadProperty)
RadControl.IComponentTreeHandler.ControlThemeChangedCallback()
RadControl.IComponentTreeHandler.OnAmbientPropertyChanged(RadProperty)
RadControl.IComponentTreeHandler.OnFocusRequested(RadElement)
RadControl.IComponentTreeHandler.OnCaptureChangeRequested(RadElement, Boolean)
RadControl.IComponentTreeHandler.OnDisplayPropertyChanged(RadPropertyChangedEventArgs)
RadControl.IComponentTreeHandler.CallOnThemeNameChanged(ThemeNameChangedEventArgs)
RadControl.IComponentTreeHandler.CallOnMouseCaptureChanged(EventArgs)
RadControl.IComponentTreeHandler.CallOnToolTipTextNeeded(Object, ToolTipTextNeededEventArgs)
RadControl.IComponentTreeHandler.CallOnScreenTipNeeded(Object, ScreenTipNeededEventArgs)
RadControl.OnZoomGesture(ZoomGestureEventArgs)
RadControl.OnRotateGesture(RotateGestureEventArgs)
RadControl.OnPanGesture(PanGestureEventArgs)
RadControl.OnTwoFingerTapGesture(GestureEventArgs)
RadControl.OnPressAndTapGesture(PressAndTapGestureEventArgs)
RadControl.OnGesture(GestureEventArgs)
RadControl.ProcessGesture(Message)
RadControl.EnableGesture(GestureType)
RadControl.DisableGesture(GestureType)
RadControl.Refresh()
RadControl.SuspendUpdate()
RadControl.ResumeUpdate()
RadControl.ResumeUpdate(Boolean)
RadControl.InvokeLayoutCallback(LayoutCallback)
RadControl.RegisterHostedControl(RadHostItem)
RadControl.UnregisterHostedControl(RadHostItem, Boolean)
RadControl.ControlDefinesThemeForElement(RadElement)
RadControl.ResolveStyleGroupForElement(StyleGroup, RadObject)
RadControl.GetPlainText()
RadControl.CanEditUIElement(RadElement)
RadControl.GetChildAt(Int32)
RadControl.ShouldSerializeProperty(RadProperty)
RadControl.ShouldSerializeProperty(RadProperty, RadObject)
RadControl.ResetProperty(RadProperty, RadObject)
RadControl.CanEditElementAtDesignTime(RadElement)
RadControl.GetControlDefaultSize()
RadControl.GetDpiScaledSize(Size)
RadControl.GetDpiScaledSize(SizeF)
RadControl.ProcessCodedUIMessage(IPCMessage)
RadControl.FindPropertyInChildren(RadControl, IPCMessage)
RadControl.CallAccessibilityNotifyClients(AccessibleEvents, Int32)
RadControl.IPCHost.ProcessMessage(IPCMessage)
RadControl.ScaleControl(SizeF, BoundsSpecified)
RadControl.PerformRadAutoScale(Nullable<BoundsSpecified>)
RadControl.SetRadAutoScale(Boolean)
RadControl.IComponentTreeHandler.get_Name()
RadControl.IComponentTreeHandler.set_Name(String)
RadControl.EnableDpiScaling
RadControl.EnableRadAutoScale
RadControl.EnableRadFormInitialDpiScaling
RadControl.EnableImageDpiScaling
RadControl.EnableSvgImages
RadControl.IsTrial
RadControl.IsLoaded
RadControl.LayoutManager
RadControl.ElementTree
RadControl.UseCompatibleTextRenderingDefaultValue
RadControl.Behavior
RadControl.RootElement
RadControl.Padding
RadControl.ThemeName
RadControl.EnableTheming
RadControl.ThemeClassName
RadControl.ImageScalingSize
RadControl.UseCompatibleTextRendering
RadControl.MaximumSize
RadControl.MinimumSize
RadControl.Focusable
RadControl.Site
RadControl.CausesValidation
RadControl.IsInitializing
RadControl.SmallImageList
RadControl.SmallImageScalingSize
RadControl.IsDesignMode
RadControl.IsDisplayed
RadControl.FocusedElement
RadControl.AllowShowFocusCues
RadControl.ShowItemToolTips
RadControl.CommandBindings
RadControl.EnableKeyMap
RadControl.BackColor
RadControl.ForeColor
RadControl.Font
RadControl.ValidationCancel
RadControl.IComponentTreeHandler.IsDesignMode
RadControl.IComponentTreeHandler.ElementTree
RadControl.IComponentTreeHandler.Behavior
RadControl.IComponentTreeHandler.Initializing
RadControl.IComponentTreeHandler.ThemeClassName
RadControl.EnableGestures
RadControl.EnableAnalytics
RadControl.AnalyticsName
RadControl.EnableRadAccessibilityObjects
RadControl.AccessibilityRequested
RadControl.EnableCodedUITests
RadControl.EnableCodedUITestsDefaultValue
RadControl.EnableUIAutomation
RadControl.EnableUIAutomationDefaultValue
RadControl.IPCHost.Context
RadControl.ElementInvalidated
RadControl.ToolTipTextNeeded
RadControl.ScreenTipNeeded
RadControl.ThemeNameChanged
RadControl.Initialized
RadControl.PropertyChanged
RadControl.ZoomGesture
RadControl.RotateGesture
RadControl.PanGesture
RadControl.TwoFingerTapGesture
RadControl.PressAndTapGesture
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll

Syntax

[TelerikToolboxCategory("Editors")]
public class RadTimeSpanPicker : RadEditorControl, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IComponentTreeHandler, ILayoutHandler, IPCHost, IAnalyticsProvider

Constructors

RadTimeSpanPicker()

Initializes a new instance of the RadTimeSpanPicker class.

Declaration
public RadTimeSpanPicker()

Properties

AutoSize

Gets or sets a value indicating whether the control automatically adjusts its size to fit its content. When enabled, the control will resize itself to properly display its content and selected time span.

Declaration
public override bool AutoSize { get; set; }
Property Value
System.Boolean

Overrides
RadControl.AutoSize

Culture

Gets or sets the culture information used for formatting and parsing time span values. This affects how the time span is displayed and interpreted in the control.

Declaration
public CultureInfo Culture { get; set; }
Property Value
System.Globalization.CultureInfo

DaysStep

Gets or sets the increment step for the days component when modifying the time span value using spin buttons or keyboard navigation.

Declaration
public int DaysStep { get; set; }
Property Value
System.Int32

DefaultSize

Gets the default size of the control in pixels.

Declaration
protected override Size DefaultSize { get; }
Property Value
System.Drawing.Size

EditMode

Gets or sets the edit mode that determines how users can interact with the control to modify the time span value. This property controls whether editing is done through text input, popup interface, or both.

Declaration
public TimeSpanEditMode EditMode { get; set; }
Property Value
TimeSpanEditMode

EnableNullValueInput

Gets or sets a value indicating whether end users can set the value to null using keyboard shortcuts. When enabled, users can press Ctrl+Del or Ctrl+0 to clear the current time span value.

Declaration
public virtual bool EnableNullValueInput { get; set; }
Property Value
System.Boolean

Format

Gets or sets the format string that determines how the time span value is displayed in the control. The format string controls which time components are shown and how they are formatted.

Declaration
public string Format { get; set; }
Property Value
System.String

HoursStep

Gets or sets the increment step for the hours component when modifying the time span value using spin buttons or keyboard navigation.

Declaration
public int HoursStep { get; set; }
Property Value
System.Int32

MaxValue

Gets or sets the maximum time span value that can be selected in the control. Values above this maximum will not be accepted or displayed.

Declaration
public TimeSpan MaxValue { get; set; }
Property Value
System.TimeSpan

MillisecondsStep

Gets or sets the increment step for the milliseconds component when modifying the time span value using spin buttons or keyboard navigation.

Declaration
public int MillisecondsStep { get; set; }
Property Value
System.Int32

MinutesStep

Gets or sets the increment step for the minutes component when modifying the time span value using spin buttons or keyboard navigation.

Declaration
public int MinutesStep { get; set; }
Property Value
System.Int32

MinValue

Gets or sets the minimum time span value that can be selected in the control. Values below this minimum will not be accepted or displayed.

Declaration
public TimeSpan MinValue { get; set; }
Property Value
System.TimeSpan

NullText

Gets or sets the text that is displayed when the control has no time span value set. This placeholder text provides guidance to users about the expected input format.

Declaration
[RadDefaultValue("NullText", typeof(RadTextBoxItem))]
[RadDescription("NullText", typeof(RadTextBoxItem))]
public string NullText { get; set; }
Property Value
System.String

PopupContentElement

Gets the popup content element that represents the element of the popup used for time span selection.

Declaration
public ITimeSpanPickerContentElement PopupContentElement { get; }
Property Value
ITimeSpanPickerContentElement

ReadOnly

Gets or sets a value indicating whether the contents of the control can be changed by the user. When set to true, the control becomes read-only and users cannot modify the time span value.

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

SecondsStep

Gets or sets the increment step for the seconds component when modifying the time span value using spin buttons or keyboard navigation.

Declaration
public int SecondsStep { get; set; }
Property Value
System.Int32

ShowSpinButtons

Gets or sets a value indicating whether the spin buttons for incrementing and decrementing time span components are visible. When enabled, users can use up/down buttons to modify the selected time component.

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

Text

This property is not relevant for this class.

Declaration
public override string Text { get; set; }
Property Value
System.String

Overrides
RadControl.Text

TextAlign

Gets or sets the horizontal alignment of the text within the control.

Declaration
public HorizontalAlignment TextAlign { get; set; }
Property Value
System.Windows.Forms.HorizontalAlignment

TimeSpanPickerElement

Gets the main element that provides the time span picker functionality. This element encapsulates the actual UI logic and behavior of the RadTimeSpanPicker control.

Declaration
public RadTimeSpanPickerElement TimeSpanPickerElement { get; }
Property Value
RadTimeSpanPickerElement

Value

Gets or sets the current time span value of the control. This property represents the selected duration and can be null if no value is set.

Declaration
public TimeSpan? Value { get; set; }
Property Value
System.Nullable<System.TimeSpan>

Methods

CreateChildItems(RadElement)

Creates the child elements of the control by instantiating and configuring the internal RadTimeSpanPickerElement. This method sets up the time span picker element and establishes its basic properties.

Declaration
protected override void CreateChildItems(RadElement parent)
Parameters
RadElement parent

The parent RadElement that will contain the child elements.

Overrides
RadControl.CreateChildItems(RadElement)

CreateTimeSpanElement()

Creates the main time span picker element that provides the core functionality for the control.

Declaration
protected virtual RadTimeSpanPickerElement CreateTimeSpanElement()
Returns
RadTimeSpanPickerElement

A new instance of RadTimeSpanPickerElement.

Dispose(Boolean)

Releases the unmanaged resources used by the RadTimeSpanPicker and optionally releases the managed resources.

Declaration
protected override void Dispose(bool disposing)
Parameters
System.Boolean disposing

true to release both managed and unmanaged resources; false to release only unmanaged resources.

Overrides
RadControl.Dispose(Boolean)

OnRightToLeftChanged(EventArgs)

Handles changes to the System.Windows.Forms.Control.RightToLeft property and updates the internal element accordingly.

Declaration
protected override void OnRightToLeftChanged(EventArgs e)
Parameters
System.EventArgs e

An System.EventArgs that contains the event data.

Overrides
RadControl.OnRightToLeftChanged(EventArgs)

OnSizeChanged(EventArgs)

Raises the System.Windows.Forms.Control.SizeChanged event and ensures proper layout of internal elements.

Declaration
protected override void OnSizeChanged(EventArgs e)
Parameters
System.EventArgs e

An System.EventArgs that contains the event data.

ProcessAutoSizeChanged(Boolean)

Processes changes to the AutoSize property and adjusts the layout behavior accordingly.

Declaration
protected override void ProcessAutoSizeChanged(bool value)
Parameters
System.Boolean value

The new value of the AutoSize property.

Overrides
RadControl.ProcessAutoSizeChanged(Boolean)

ResetBackColorThemeOverrides()

Resets theme value overrides for the background color property on the internal elements.

Declaration
protected override void ResetBackColorThemeOverrides()
Overrides
RadControl.ResetBackColorThemeOverrides()

ResetForeColorThemeOverrides()

Resets theme value overrides for the foreground color property on the internal elements.

Declaration
protected override void ResetForeColorThemeOverrides()
Overrides
RadControl.ResetForeColorThemeOverrides()

SetBackColorThemeOverrides()

Sets theme value overrides for the background color property on the internal elements.

Declaration
protected override void SetBackColorThemeOverrides()
Overrides
RadControl.SetBackColorThemeOverrides()

SetForeColorThemeOverrides()

Sets theme value overrides for the foreground color property on the internal elements.

Declaration
protected override void SetForeColorThemeOverrides()
Overrides
RadControl.SetForeColorThemeOverrides()

UnwireEvents()

Unsubscribes from all previously subscribed events from the internal RadTimeSpanPickerElement.

Declaration
protected void UnwireEvents()

WireEvents()

Subscribes to the necessary events from the internal RadTimeSpanPickerElement.

Declaration
protected void WireEvents()

WndProc(ref Message)

Processes Windows messages and handles focus management for the internal text box control.

Declaration
protected override void WndProc(ref Message m)
Parameters
System.Windows.Forms.Message m

The Windows message to process.

Overrides
RadControl.WndProc(ref Message)

Events

KeyDown

Occurs when the user presses a key while the control has focus.

Declaration
public event KeyEventHandler KeyDown
Event Type
System.Windows.Forms.KeyEventHandler

KeyPress

Occurs when the user presses and releases a key while the control has focus.

Declaration
public event KeyPressEventHandler KeyPress
Event Type
System.Windows.Forms.KeyPressEventHandler

KeyUp

Occurs when the user releases a key while the control has focus.

Declaration
public event KeyEventHandler KeyUp
Event Type
System.Windows.Forms.KeyEventHandler

PopupClosed

Occurs when the popup has been successfully closed.

Declaration
public event RadPopupClosedEventHandler PopupClosed
Event Type
RadPopupClosedEventHandler

PopupClosing

Occurs when the popup is about to be closed and allows the operation to be canceled.

Declaration
public event RadPopupClosingEventHandler PopupClosing
Event Type
RadPopupClosingEventHandler

PopupOpened

Occurs when the popup has been successfully opened.

Declaration
public event EventHandler PopupOpened
Event Type
System.EventHandler

PopupOpening

Occurs when the popup is about to be opened and allows the operation to be canceled.

Declaration
public event CancelEventHandler PopupOpening
Event Type
System.ComponentModel.CancelEventHandler

ValueChanged

Occurs when the time span value has been successfully changed.

Declaration
public event EventHandler ValueChanged
Event Type
System.EventHandler

ValueChanging

Occurs when the time span value is about to be changed and allows the operation to be canceled.

Declaration
public event CancelEventHandler ValueChanging
Event Type
System.ComponentModel.CancelEventHandler

Extension Methods

SvgExtentions.Traverse<T>(T, Func<T, IEnumerable<T>>)
SvgExtentions.TraverseDepthFirst<T>(T, Func<T, IEnumerable<T>>)
Getting Started
  • Install Now
  • Demos
  • Step-by-Step Tutorial
  • Sample Applications
  • SDK Samples
  • Visual Studio Extensions
Support Resources
  • Code Library
  • Knowledge Base
  • Videos
Community
  • Forums
  • Blogs
  • Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.