ClassRadTimeSpanPicker
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.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
[TelerikToolboxCategory("Editors")]
public class RadTimeSpanPicker : RadEditorControl, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IComponentTreeHandler, ILayoutHandler, IAnalyticsProvider
Inheritance: objectMarshalByRefObjectComponentControlScrollableControlRadControlRadEditorControlRadTimeSpanPicker
Implements:
Inherited Members
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
[Browsable(true)]
public override bool AutoSize { get; set; }
Property Value
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.
DaysStep
Gets or sets the increment step for the days component when modifying the time span value using spin buttons or keyboard navigation.
DefaultSize
Gets the default size of the control in pixels.
Declaration
protected override Size DefaultSize { get; }
Property Value
Overrides
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
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
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
[Browsable(true)]
public string Format { get; set; }
Property Value
HoursStep
Gets or sets the increment step for the hours component when modifying the time span value using spin buttons or keyboard navigation.
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
[Browsable(true)]
public TimeSpan MaxValue { get; set; }
Property Value
MillisecondsStep
Gets or sets the increment step for the milliseconds component when modifying the time span value using spin buttons or keyboard navigation.
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
[Browsable(true)]
public TimeSpan MinValue { get; set; }
Property Value
MinutesStep
Gets or sets the increment step for the minutes component when modifying the time span value using spin buttons or keyboard navigation.
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.
PopupContentElement
Gets the popup content element that represents the element of the popup used for time span selection.
Declaration
[Browsable(false)]
public ITimeSpanPickerContentElement PopupContentElement { get; }
Property Value
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.
SecondsStep
Gets or sets the increment step for the seconds component when modifying the time span value using spin buttons or keyboard navigation.
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
[Browsable(true)]
public bool ShowSpinButtons { get; set; }
Property Value
TextAlign
Gets or sets the horizontal alignment of the text within the control.
Declaration
[Browsable(true)]
public HorizontalAlignment TextAlign { get; set; }
Property Value
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
[Browsable(false)]
public RadTimeSpanPickerElement TimeSpanPickerElement { get; }
Property Value
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
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
A new instance of RadTimeSpanPickerElement.
Dispose(bool)
Releases the unmanaged resources used by the RadTimeSpanPicker and optionally releases the managed resources.
Declaration
protected override void Dispose(bool disposing)
Parameters
disposing
true to release both managed and unmanaged resources; false to release only unmanaged resources.
Overrides
OnRightToLeftChanged(EventArgs)
Handles changes to the RightToLeft property and updates the internal element accordingly.
OnSizeChanged(EventArgs)
Raises the SizeChanged event and ensures proper layout of internal elements.
ProcessAutoSizeChanged(bool)
Processes changes to the AutoSize property and adjusts the layout behavior accordingly.
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
m
The Windows message to process.
Overrides
Events
KeyDown
Occurs when the user presses a key while the control has focus.
KeyPress
Occurs when the user presses and releases a key while the control has focus.
Declaration
public event KeyPressEventHandler KeyPress
Event Value
KeyUp
Occurs when the user releases a key while the control has focus.
PopupClosed
Occurs when the popup has been successfully closed.
Declaration
public event RadPopupClosedEventHandler PopupClosed
Event Value
PopupClosing
Occurs when the popup is about to be closed and allows the operation to be canceled.
Declaration
public event RadPopupClosingEventHandler PopupClosing
Event Value
PopupOpened
Occurs when the popup has been successfully opened.
PopupOpening
Occurs when the popup is about to be opened and allows the operation to be canceled.
Declaration
public event CancelEventHandler PopupOpening
Event Value
ValueChanged
Occurs when the time span value has been successfully changed.
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 Value