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.
Inherited Members
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()
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
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
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
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
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
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
ResetBackColorThemeOverrides()
Resets theme value overrides for the background color property on the internal elements.
Declaration
protected override void ResetBackColorThemeOverrides()
Overrides
ResetForeColorThemeOverrides()
Resets theme value overrides for the foreground color property on the internal elements.
Declaration
protected override void ResetForeColorThemeOverrides()
Overrides
SetBackColorThemeOverrides()
Sets theme value overrides for the background color property on the internal elements.
Declaration
protected override void SetBackColorThemeOverrides()
Overrides
SetForeColorThemeOverrides()
Sets theme value overrides for the foreground color property on the internal elements.
Declaration
protected override void SetForeColorThemeOverrides()
Overrides
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
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
|