Class RadTimePickerElement
Represents the main element of the RadTimePicker control. It hosts all child elements and provides the core functionality for time selection, popup management, and user interaction.
Inheritance
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll
Syntax
public class RadTimePickerElement : PopupEditorBaseElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IComponent, IDisposable, IBindableComponent, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IInputEditor, IValueEditor, ISupportInitialize, IPickerContentElementOwner
  Constructors
RadTimePickerElement()
Initializes a new instance of the RadTimePickerElement class with default settings.
Declaration
public RadTimePickerElement()
  Fields
IsDropDownShownProperty
Identifies the IsDropDownShown dependency property that indicates whether the time picker popup is currently displayed.
Declaration
public static RadProperty IsDropDownShownProperty
  Field Value
| 
        RadProperty
         
  | 
    
PopupMinSizeProperty
Identifies the PopupMinSize dependency property that specifies the minimum size constraints for the time picker popup.
Declaration
public static RadProperty PopupMinSizeProperty
  Field Value
| 
        RadProperty
         
  | 
    
Properties
ButtonPanelHeight
Gets or sets the button panel height.
Declaration
public int ButtonPanelHeight { get; set; }
  Property Value
| 
        System.Int32
         
  | 
    
ClockBeforeTables
This property is used internally.
Declaration
public bool ClockBeforeTables { get; set; }
  Property Value
| 
        System.Boolean
         
  | 
    
ClockPosition
Determines the click position.
Declaration
public ClockPosition ClockPosition { get; set; }
  Property Value
| 
        ClockPosition
         
  | 
    
ColumnsCount
Gets or sets the column count.
Declaration
public int ColumnsCount { get; set; }
  Property Value
| 
        System.Int32
         
  | 
    
Culture
Gets or sets the culture.
Declaration
public CultureInfo Culture { get; set; }
  Property Value
| 
        System.Globalization.CultureInfo
         
  | 
    
Implements
DownButton
Gets the down arrow button.
Declaration
public RadRepeatArrowElement DownButton { get; }
  Property Value
| 
        RadRepeatArrowElement
         
  | 
    
DropDownAnimationEnabled
Gets or sets a value indicating whether the RadDropDownList will be animated when displaying.
Declaration
public bool DropDownAnimationEnabled { get; set; }
  Property Value
| 
        System.Boolean
         
  | 
    
DropDownButton
Gets the drop-down button.
Declaration
public RadTimeDropDownButtonElement DropDownButton { get; }
  Property Value
| 
        RadTimeDropDownButtonElement
         
  | 
    
EditorElement
Gets or sets the editor element.
Declaration
public override RadItem EditorElement { get; set; }
  Property Value
| 
        RadItem
         
  | 
    
Overrides
Format
Gets or sets the format string.
Declaration
public string Format { get; set; }
  Property Value
| 
        System.String
         
  | 
    
Implements
HeadersHeight
Gets or sets the headers height.
Declaration
public int HeadersHeight { get; set; }
  Property Value
| 
        System.Int32
         
  | 
    
HourHeaderText
Gets the hours header text.
Declaration
public string HourHeaderText { get; set; }
  Property Value
| 
        System.String
         
  | 
    
Implements
MaskedEditBox
Gets the masked edit box.
Declaration
public virtual RadMaskedEditBoxElement MaskedEditBox { get; }
  Property Value
| 
        RadMaskedEditBoxElement
         
  | 
    
MaxValue
Gets or sets the maximum value.
Declaration
public DateTime MaxValue { get; set; }
  Property Value
| 
        System.DateTime
         
  | 
    
MinutesHeaderText
Gets the minutes header text.
Declaration
public virtual string MinutesHeaderText { get; set; }
  Property Value
| 
        System.String
         
  | 
    
Implements
MinValue
Gets or sets the minimum value.
Declaration
public DateTime MinValue { get; set; }
  Property Value
| 
        System.DateTime
         
  | 
    
NullText
Gets or sets the text that is displayed when RadDropDownList has no text set.
Declaration
[RadDefaultValue("NullText", typeof(RadTextBoxItem))]
[RadDescription("NullText", typeof(RadTextBoxItem))]
public string NullText { get; set; }
  Property Value
| 
        System.String
         
  | 
    
PopupContentElement
Gets the pop-up content element.
Declaration
public virtual RadTimePickerContentElement PopupContentElement { get; }
  Property Value
| 
        RadTimePickerContentElement
         
  | 
    
PopupForm
Gets the pop-up form.
Declaration
public RadTimePickerPopup PopupForm { get; }
  Property Value
| 
        RadTimePickerPopup
         
  | 
    
PopupMinSize
Determines the minimum size of the pop-up.
Declaration
public Size PopupMinSize { get; set; }
  Property Value
| 
        System.Drawing.Size
         
  | 
    
ReadOnly
Enables or disables the ReadOnly mode of RadTimeBox. The default value is false.
Declaration
public bool ReadOnly { get; set; }
  Property Value
| 
        System.Boolean
         
  | 
    
RowHeight
Gets or sets the row height.
Declaration
public int RowHeight { get; set; }
  Property Value
| 
        System.Int32
         
  | 
    
ShowSpinButtons
Indicates whether to show the spin buttons.
Declaration
public bool ShowSpinButtons { get; set; }
  Property Value
| 
        System.Boolean
         
  | 
    
SpinButtonsStackLayout
Gets the StackLayoutElement that contains the spin buttons.
Declaration
public StackLayoutElement SpinButtonsStackLayout { get; }
  Property Value
| 
        StackLayoutElement
         
  | 
    
Step
Gets or sets the step.
Declaration
public int Step { get; set; }
  Property Value
| 
        System.Int32
         
  | 
    
TableWidth
Gets or sets the table width.
Declaration
public int TableWidth { get; set; }
  Property Value
| 
        System.Int32
         
  | 
    
TimeTables
Gets or sets a value indicating how the time tables will be displayed.
Declaration
public TimeTables TimeTables { get; set; }
  Property Value
| 
        TimeTables
         
  | 
    
TwoTablesForTime
Determines whether to use two tables for hours and minutes or display them into a single table.
Declaration
public bool TwoTablesForTime { get; set; }
  Property Value
| 
        System.Boolean
         
  | 
    
UpButton
Gets the up arrow button.
Declaration
public RadRepeatArrowElement UpButton { get; }
  Property Value
| 
        RadRepeatArrowElement
         
  | 
    
Value
Gets or sets the value. The property is of type System.DateTime.
Declaration
public override object Value { get; set; }
  Property Value
| 
        System.Object
         
  | 
    
Overrides
Implements
Methods
arrowButton_Click(Object, EventArgs)
Called when the arrow button is clicked.
Declaration
protected virtual void arrowButton_Click(object sender, EventArgs e)
  Parameters
| 
        System.Object
        sender
         The source of the event.  | 
    
| 
        System.EventArgs
        e
         An object that contains no event data.  | 
    
CloseOwnerPopup()
Closes the pop-up.
Declaration
public void CloseOwnerPopup()
  Implements
CreateArrowButtonElement()
Creates the arrow button element.
Declaration
protected virtual void CreateArrowButtonElement()
  CreateChildElements()
Called by the element when constructed. Allows inheritors to build the element tree.
Declaration
protected override void CreateChildElements()
  Overrides
CreateDownButton()
Creates the button element for the decrement button.
Declaration
protected virtual RadRepeatArrowElement CreateDownButton()
  Returns
| 
        RadRepeatArrowElement
         A RadRepeatArrowElement to be placed in the RadSpinElement.  | 
    
CreatePopupForm()
Creates and configures the popup form that displays the time selection interface.
Declaration
protected override RadPopupControlBase CreatePopupForm()
  Returns
| 
        RadPopupControlBase
         A RadPopupControlBase instance representing the time picker popup.  | 
    
Overrides
CreateSpinButtons()
Creates the spin buttons and the container.
Declaration
protected virtual void CreateSpinButtons()
  CreateTextEditorElement()
Creates the text editor element used for time input and display.
Declaration
protected virtual void CreateTextEditorElement()
  CreateUpButton()
Creates the button element for the increment button.
Declaration
protected virtual RadRepeatArrowElement CreateUpButton()
  Returns
| 
        RadRepeatArrowElement
         A RadRepeatArrowElement to be placed in the RadSpinElement.  | 
    
DisposeManagedResources()
Releases the managed resources.
Declaration
protected override void DisposeManagedResources()
  Overrides
GetInitialPopupSize()
Gets the initial size of the pop-up.
Declaration
protected override Size GetInitialPopupSize()
  Returns
| 
        System.Drawing.Size
         
  | 
    
Overrides
GetPopupSize(RadPopupControlBase, Boolean)
Gets the size of the pop-up.
Declaration
protected override Size GetPopupSize(RadPopupControlBase popup, bool measure)
  Parameters
| 
        RadPopupControlBase
        popup
         The pop-up.  | 
    
| 
        System.Boolean
        measure
         Not used.  | 
    
Returns
| 
        System.Drawing.Size
         The size of the pop-up.  | 
    
Overrides
MaskEditBox_Click(Object, EventArgs)
Called when the mask edit box is clicked.
Declaration
protected virtual void MaskEditBox_Click(object sender, EventArgs e)
  Parameters
| 
        System.Object
        sender
         The source of the event.  | 
    
| 
        System.EventArgs
        e
         An object that contains no event data.  | 
    
MaskEditBox_KeyDown(Object, KeyEventArgs)
Called when a key is pressed down while the mask edit box has focus.
Declaration
protected virtual void MaskEditBox_KeyDown(object sender, KeyEventArgs e)
  Parameters
| 
        System.Object
        sender
         The source of the event.  | 
    
| 
        System.Windows.Forms.KeyEventArgs
        e
         A System.Windows.Forms.KeyEventArgs that contains the event data.  | 
    
MaskEditBox_KeyPress(Object, KeyPressEventArgs)
Called when a key is pressed while the mask edit box has focus.
Declaration
protected virtual void MaskEditBox_KeyPress(object sender, KeyPressEventArgs e)
  Parameters
| 
        System.Object
        sender
         The source of the event.  | 
    
| 
        System.Windows.Forms.KeyPressEventArgs
        e
         A System.Windows.Forms.KeyPressEventArgs that contains the event data.  | 
    
MaskEditBox_MouseUp(Object, MouseEventArgs)
Called when the mouse pointer is over the mask edit box and a mouse button is released.
Declaration
protected virtual void MaskEditBox_MouseUp(object sender, MouseEventArgs e)
  Parameters
| 
        System.Object
        sender
         The source of the event.  | 
    
| 
        System.Windows.Forms.MouseEventArgs
        e
         A System.Windows.Forms.MouseEventArgs that contains the event data.  | 
    
MaskEditBox_MouseWheel(Object, MouseEventArgs)
Called when the mouse wheel moves while the mask edit box has focus.
Declaration
protected virtual void MaskEditBox_MouseWheel(object sender, MouseEventArgs e)
  Parameters
| 
        System.Object
        sender
         The source of the event.  | 
    
| 
        System.Windows.Forms.MouseEventArgs
        e
         A System.Windows.Forms.MouseEventArgs that contains the event data.  | 
    
MeasureOverride(SizeF)
Measures the space required by the RadElement
Used by the layout system.
Declaration
protected override SizeF MeasureOverride(SizeF availableSize)
  Parameters
| 
        System.Drawing.SizeF
        availableSize
         The size that is available to the RadElement. The available size can be infinity (to take the full size of the element)  | 
    
Returns
| 
        System.Drawing.SizeF
         The minimum size required by the element to be completely visible. Cannot be infinity.  | 
    
Overrides
Remarks
In this method call to the Measure method of each child must be made.
OnLoaded()
Called when the element has been successfully loaded. That includes loading of all its children as well.
Declaration
protected override void OnLoaded()
  Overrides
OnPopupClosed(Object, RadPopupClosedEventArgs)
Called when the pop-up is closed.
Declaration
protected virtual void OnPopupClosed(object sender, RadPopupClosedEventArgs args)
  Parameters
| 
        System.Object
        sender
         The source of the event.  | 
    
| 
        RadPopupClosedEventArgs
        args
         A RadPopupClosedEventArgs that contains the event data.  | 
    
OnPopupClosing(Object, RadPopupClosingEventArgs)
Called when the pop-up is about to be closed. Cancellable.
Declaration
protected virtual void OnPopupClosing(object sender, RadPopupClosingEventArgs args)
  Parameters
| 
        System.Object
        sender
         The source of the event.  | 
    
| 
        RadPopupClosingEventArgs
        args
         A RadPopupClosingEventArgs that contains the event data.  | 
    
OnPopupOpened(Object, EventArgs)
Called when the pop-up is opened.
Declaration
protected virtual void OnPopupOpened(object sender, EventArgs e)
  Parameters
| 
        System.Object
        sender
         The source of the event.  | 
    
| 
        System.EventArgs
        e
         An object that contains no event data.  | 
    
OnPropertyChanged(RadPropertyChangedEventArgs)
Called when a RadProperty value of this instance is changed.
Declaration
protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
  Parameters
| 
        RadPropertyChangedEventArgs
        e
         A RadPropertyChangedEventArgs that contains the event data.  | 
    
Overrides
OnValueChanged(Object, EventArgs)
Raises the ValueChanged event.
Declaration
protected virtual void OnValueChanged(object sender, EventArgs e)
  Parameters
| 
        System.Object
        sender
         The source of the event.  | 
    
| 
        System.EventArgs
        e
         An object that contains no event data.  | 
    
OnValueChanging(Object, CancelEventArgs)
Raises the ValueChanging event.
Declaration
protected virtual void OnValueChanging(object sender, CancelEventArgs e)
  Parameters
| 
        System.Object
        sender
         The source of the event.  | 
    
| 
        System.ComponentModel.CancelEventArgs
        e
         A System.ComponentModel.CancelEventArgs that contains the event data.  | 
    
UnwireEvents()
Detaches from all events of its sub-elements.
Declaration
protected virtual void UnwireEvents()
  UpdateHeadersText()
Updates all header texts.
Declaration
protected virtual void UpdateHeadersText()
  WireEvents()
Attaches to all necessary events of its sub-elements.
Declaration
protected virtual void WireEvents()
  Events
Click
Occurs when the control is clicked.
Declaration
public event EventHandler Click
  Event Type
| 
        System.EventHandler
         
  | 
    
KeyDown
Occurs when a key is pressed down while the control has focus.
Declaration
public event KeyEventHandler KeyDown
  Event Type
| 
        System.Windows.Forms.KeyEventHandler
         
  | 
    
KeyPress
Occurs when a key is pressed while the control has focus.
Declaration
public event KeyPressEventHandler KeyPress
  Event Type
| 
        System.Windows.Forms.KeyPressEventHandler
         
  | 
    
KeyUp
Occurs when a key is released while the control has focus.
Declaration
public event KeyEventHandler KeyUp
  Event Type
| 
        System.Windows.Forms.KeyEventHandler
         
  | 
    
MouseUp
Occurs when the mouse pointer is over the control and a mouse button is released.
Declaration
public event MouseEventHandler MouseUp
  Event Type
| 
        System.Windows.Forms.MouseEventHandler
         
  | 
    
MouseWheel
Occurs when the mouse wheel moves while the control has focus.
Declaration
public event MouseEventHandler MouseWheel
  Event Type
| 
        System.Windows.Forms.MouseEventHandler
         
  | 
    
TimeCellFormatting
Occurs when the content of a time cell needs to be formatted for display.
Declaration
public event TimeCellFormattingEventHandler TimeCellFormatting
  Event Type
| 
        TimeCellFormattingEventHandler
         
  | 
    
ValueChanged
Occurs when the editing value has been changed
Declaration
public event EventHandler ValueChanged
  Event Type
| 
        System.EventHandler
         
  | 
    
ValueChanging
Occurs when the editing value is changing.
Declaration
public event CancelEventHandler ValueChanging
  Event Type
| 
        System.ComponentModel.CancelEventHandler
         
  |