Table of Contents

Class TimePicker

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

Represents a control that displays a time and allows to edit it.

[DefaultBindingProperty("Value")]
[ControlCategory("Date")]
public class TimePicker : ControlAndButton<ToolBar>, IBaseObjectWithAttr, IBaseObjectWithId, INotifyPropertyChanged, IDisposableObject, IBaseObject, ISupportInitialize, IFocusable, ITextProperty, IComponent, IControl, IDisposable, IWin32Window, ILayoutItem, INotifyDataErrorInfo
Inheritance
TimePicker
Implements

Constructors

TimePicker()

Initializes a new instance of the TimePicker class.

Fields

DefaultDecrementImage

Gets or sets the default image used for decrementing the time.

DefaultHourFormat

Gets or sets the default hour format for the TimePicker.

DefaultIncrementImage

Gets or sets the default image used for incrementing the time.

DefaultUseControlColors

Gets or sets whether to assign default control colors in the constructor using UseControlColors(bool). Default is true.

Properties

FormatProvider

Gets or sets the format provider used for formatting the time.

HourFormat

Gets or sets the hour format for the TimePicker. Default is null, which means DefaultHourFormat will be used.

SecondsVisible

Gets or sets whether the seconds part of the time is visible.

SelectedPart

Gets or sets the currently selected part of the time value.

Value

Gets or sets selected time.

Methods

GetAmPmValue()

Gets am/pm value for the current value selected in TimePicker.

GetFocusableChildren(bool)

Gets collection of the focusable children controls.

GetHoursAsString(bool)

Gets hours as a string for the current value selected in TimePicker.

GetLastPart()

Gets the last part of the time value that can be selected.

GetMinutesAsString()

Gets minutes as a string for the current value selected in TimePicker.

GetSecondsAsString()

Gets seconds as a string for the current value selected in TimePicker.

GetTimeSeparator()

Gets time separator used in the TimePicker. Typically it is a colon (:).

IncHours(int)

Increments the hours part of the time value by the specified amount.

IncMinutes(int)

Increments the minutes part of the time value by the specified amount.

IncPartValue(int)

Increments the value of the currently selected part of the time.

IncSeconds(int)

Increments the seconds part of the time value by the specified amount.

OnButtonClick(ControlAndButtonClickEventArgs)

Called when button is clicked.

OnGotFocus(EventArgs)

This method is invoked when the control gets focus.

OnKeyDown(KeyEventArgs)

Called when the KeyDown event is raised.

OnLostFocus(EventArgs)

This method is invoked when the control lost focus.

OnMouseLeftButtonDown(MouseEventArgs)

Called when the left mouse button was pressed.

OnSystemColorsChanged(EventArgs)

Called when the SystemColorsChanged event is raised.

OnValueChanged(EventArgs)

Called when the value of the Value property changes.

RaiseValueChanged(EventArgs)

Raises the ValueChanged event and calls OnValueChanged(EventArgs).

SelectLastPart()

Selects the last part of the time value.

SelectNextPart(bool)

Selects the next part of the time value.

UpdateButtons()

Updates the text of the buttons in the TimePicker.

Events

ValueChanged

Occurs when Value property is changed.