HypernovaDesktop Components · docs
Binarymission
WinFormsTime Picker › TimePickerDropDown

TimePickerDropDown

class.NET 6 / 8 / 10.NET Framework 4.8Binarymission.WinForms.Controls.Selectors.TimeSelectors

A custom control providing sophisticated UI, UX, and rich features for time picking functionality.

public class TimePickerDropDown : Control, ITimePickerHost

Inherits from / implements: Control, ITimePickerHost

Members at a glance

TimePickerDropDownConstructs a new instance of TimePickerDropDown class.
AnteMeridianValueGets or sets the ante meridian value.
ContentPaddingGets or sets the content padding.
DropDownHostConfigurationGets or sets the drop down host configuration.
DropDownTimeSelectionButtonEndColorGets or sets the end color of the drop-down time selection button.
DropDownTimeSelectionButtonStartColorGets or sets the start color of the drop-down time selection button.
EnforceTimeOnlyFormatsGets or sets a value indicating whether the control should enforce time-only formats, such as h, H, s, m, t.
HourValueComponentBackColorGets or sets the backcolor of the hour value displaying component.
HourValueComponentBackgroundEndColorGets or sets the end color of the hour value component background.
HourValueComponentBackgroundStartColorGets or sets the start color of the hour value component background.
HourValueComponentDisplayForeColorGets or sets the forecolor of the hour value component display.
IntervalGets or sets the interval.
MaxValueGets or sets the maximum value.
MinValueGets or sets the minimum value.
MinuteValueComponentBackColorGets or sets the backcolor of the minute value displaying component.
MinuteValueComponentBackgroundEndColorGets or sets the end color of the minute value component background.
MinuteValueComponentBackgroundStartColorGets or sets the start color of the minute value component background.
MinuteValueComponentDisplayForeColorGets or sets the forecolor of the minute value component display.
MousePressedValueChangeTriggerSpeedGets or sets the mouse pressed value change trigger speed.
PostMeridianValueGets or sets the post meridian value.
SecondValueComponentBackColorGets or sets the backcolor of the second display value component.
SecondValueComponentBackgroundEndColorGets or sets the end color of the second value component background.
SecondValueComponentBackgroundStartColorGets or sets the start color of the second value component background.
SecondValueComponentDisplayForeColorGets or sets the forecolor of the second value component display.
ShouldAutoScaleTimePickerComponentsFontGets or sets whether the control should automatically scale time picker components font as and when the user re-sizes the drop-down window.
ShouldCloseSelectorDropDownViewUponAcceptCancelChangesGets or sets a value indicating whether the control should close selector drop-down view upon the user accepting / canceling the changes inside the hosted view.
ShouldDisplayClockGets or sets a value indicating whether the control should display the analog clock control to display the selected time.
ShouldDrawSpinnerButtonsInFullSizeGets or sets whether the control should draw the full size of the spinner buttons.
SpinnerBackgroundBrushEndColorGets or sets the end color of the spinner background brush.
SpinnerBackgroundBrushStartColorGets or sets the start color of the spinner background brush.
SpinnerHoverBackgroundBrushEndColorGets or sets the end color of the spinner hover background brush.
SpinnerHoverBackgroundBrushStartColorGets or sets the start color of the spinner hover background brush.
SpinnerPressedBackgroundBrushEndColorGets or sets the end color of the spinner pressed background brush.
SpinnerPressedBackgroundBrushStartColorGets or sets the start color of the spinner pressed background brush.
TimeConventionGets or sets the time convention.
TimeMeridianValueComponentBackColorGets or sets the backcolor of the time meridian value displaying component.
TimeMeridianValueComponentBackgroundEndColorGets or sets the end color of the time meridian value component background.
TimeMeridianValueComponentBackgroundStartColorGets or sets the start color of the time meridian value component background.
TimeMeridianValueComponentDisplayForeColorGets or sets the forecolor of the time meridian value component display.
TimePickerComponentsFontGets or sets the time picker various components' font.
TimePickerDropDownBackgroundEndColorGets or sets the end color of the time picker drop-down background.
TimePickerDropDownBackgroundStartColorGets or sets the start color of the time picker drop-down background.
TimeValueGets or sets a value indicating whether the should override default system am / pm text with customised am / pm text.
TwelveHoursTimeDisplayFormatGets or sets the twelve hours time display format.
TwentyFourHoursTimeDisplayFormatGets or sets the twenty four hours time display format.
ValueComponentBackColorGets or sets the backcolor of the value component.
ValueComponentBorderColorGets or sets the color of the value component's border.
ValueComponentBorderThicknessGets or sets the value component's border thickness.
ValueDisplayTextFontOffSetFactorGets or sets the value display text font offset factor.
ValueStringFormatGets or sets the value string format.
OnDropDownViewClosedCalled once the time selector has left the screen.
OnDropDownViewOpenedCalled once the time selector is on screen.
OnHandleCreatedRaises the HandleCreated event. TimePickerDropDown overrides it so the control's own handling runs alongside the base behavior.
OnKeyUpHandles the KeyUp event.
OnParentChangedHandles the ParentChanged event.
PerformDropDownPerforms the time picker drop-down.
DropDownViewClosedRaised when the drop-down view is closed.
DropDownViewOpenedRaised when the drop-down view is opened.

Constructors

TimePickerDropDown

public TimePickerDropDown()

Constructs a new instance of TimePickerDropDown class.

Properties

AnteMeridianValue

public string AnteMeridianValue

Gets or sets the ante meridian value.

This value lets you set a custom AM value to display inside the AM/PM picker part of the drop-down view in the control.

ContentPadding

public Padding ContentPadding

Gets or sets the content padding.

DropDownHostConfiguration

public DropDownHostConfiguration DropDownHostConfiguration

Gets or sets the drop down host configuration.

Set this property to your desired values as to how you want the drop-down view container should work.

DropDownTimeSelectionButtonEndColor

public Color DropDownTimeSelectionButtonEndColor

Gets or sets the end color of the drop-down time selection button.

DropDownTimeSelectionButtonStartColor

public Color DropDownTimeSelectionButtonStartColor

Gets or sets the start color of the drop-down time selection button.

EnforceTimeOnlyFormats

public bool EnforceTimeOnlyFormats

Gets or sets a value indicating whether the control should enforce time-only formats, such as h, H, s, m, t.

HourValueComponentBackColor

public Color HourValueComponentBackColor

Gets or sets the backcolor of the hour value displaying component.

HourValueComponentBackgroundEndColor

public Color HourValueComponentBackgroundEndColor

Gets or sets the end color of the hour value component background.

HourValueComponentBackgroundStartColor

public Color HourValueComponentBackgroundStartColor

Gets or sets the start color of the hour value component background.

HourValueComponentDisplayForeColor

public Color HourValueComponentDisplayForeColor

Gets or sets the forecolor of the hour value component display.

Interval

public decimal Interval

Gets or sets the interval.

MaxValue

public int MaxValue

Gets or sets the maximum value.

MinValue

public int MinValue

Gets or sets the minimum value.

MinuteValueComponentBackColor

public Color MinuteValueComponentBackColor

Gets or sets the backcolor of the minute value displaying component.

MinuteValueComponentBackgroundEndColor

public Color MinuteValueComponentBackgroundEndColor

Gets or sets the end color of the minute value component background.

MinuteValueComponentBackgroundStartColor

public Color MinuteValueComponentBackgroundStartColor

Gets or sets the start color of the minute value component background.

MinuteValueComponentDisplayForeColor

public Color MinuteValueComponentDisplayForeColor

Gets or sets the forecolor of the minute value component display.

MousePressedValueChangeTriggerSpeed

public int MousePressedValueChangeTriggerSpeed

Gets or sets the mouse pressed value change trigger speed.

PostMeridianValue

public string PostMeridianValue

Gets or sets the post meridian value.

This value lets you set a custom PM value to display inside the AM/PM picker part of the drop-down view in the control.

SecondValueComponentBackColor

public Color SecondValueComponentBackColor

Gets or sets the backcolor of the second display value component.

SecondValueComponentBackgroundEndColor

public Color SecondValueComponentBackgroundEndColor

Gets or sets the end color of the second value component background.

SecondValueComponentBackgroundStartColor

public Color SecondValueComponentBackgroundStartColor

Gets or sets the start color of the second value component background.

SecondValueComponentDisplayForeColor

public Color SecondValueComponentDisplayForeColor

Gets or sets the forecolor of the second value component display.

ShouldAutoScaleTimePickerComponentsFont

public bool ShouldAutoScaleTimePickerComponentsFont

Gets or sets whether the control should automatically scale time picker components font as and when the user re-sizes the drop-down window.

ShouldCloseSelectorDropDownViewUponAcceptCancelChanges

public bool ShouldCloseSelectorDropDownViewUponAcceptCancelChanges

Gets or sets a value indicating whether the control should close selector drop-down view upon the user accepting / canceling the changes inside the hosted view.

ShouldDisplayClock

public bool ShouldDisplayClock

Gets or sets a value indicating whether the control should display the analog clock control to display the selected time.

ShouldDrawSpinnerButtonsInFullSize

public bool ShouldDrawSpinnerButtonsInFullSize

Gets or sets whether the control should draw the full size of the spinner buttons.

SpinnerBackgroundBrushEndColor

public Color SpinnerBackgroundBrushEndColor

Gets or sets the end color of the spinner background brush.

SpinnerBackgroundBrushStartColor

public Color SpinnerBackgroundBrushStartColor

Gets or sets the start color of the spinner background brush.

SpinnerHoverBackgroundBrushEndColor

public Color SpinnerHoverBackgroundBrushEndColor

Gets or sets the end color of the spinner hover background brush.

SpinnerHoverBackgroundBrushStartColor

public Color SpinnerHoverBackgroundBrushStartColor

Gets or sets the start color of the spinner hover background brush.

SpinnerPressedBackgroundBrushEndColor

public Color SpinnerPressedBackgroundBrushEndColor

Gets or sets the end color of the spinner pressed background brush.

SpinnerPressedBackgroundBrushStartColor

public Color SpinnerPressedBackgroundBrushStartColor

Gets or sets the start color of the spinner pressed background brush.

TimeConvention

public TimeConvention TimeConvention

Gets or sets the time convention.

TimeMeridianValueComponentBackColor

public Color TimeMeridianValueComponentBackColor

Gets or sets the backcolor of the time meridian value displaying component.

TimeMeridianValueComponentBackgroundEndColor

public Color TimeMeridianValueComponentBackgroundEndColor

Gets or sets the end color of the time meridian value component background.

TimeMeridianValueComponentBackgroundStartColor

public Color TimeMeridianValueComponentBackgroundStartColor

Gets or sets the start color of the time meridian value component background.

TimeMeridianValueComponentDisplayForeColor

public Color TimeMeridianValueComponentDisplayForeColor

Gets or sets the forecolor of the time meridian value component display.

TimePickerComponentsFont

public Font TimePickerComponentsFont

Gets or sets the time picker various components' font.

TimePickerDropDownBackgroundEndColor

public Color TimePickerDropDownBackgroundEndColor

Gets or sets the end color of the time picker drop-down background.

TimePickerDropDownBackgroundStartColor

public Color TimePickerDropDownBackgroundStartColor

Gets or sets the start color of the time picker drop-down background.

TimeValue

public DateTime TimeValue

Gets or sets a value indicating whether the should override default system am / pm text with customised am / pm text.

TwelveHoursTimeDisplayFormat

public string TwelveHoursTimeDisplayFormat

Gets or sets the twelve hours time display format.

TwentyFourHoursTimeDisplayFormat

public string TwentyFourHoursTimeDisplayFormat

Gets or sets the twenty four hours time display format.

ValueComponentBackColor

public Color ValueComponentBackColor

Gets or sets the backcolor of the value component.

ValueComponentBorderColor

public Color ValueComponentBorderColor

Gets or sets the color of the value component's border.

ValueComponentBorderThickness

public int ValueComponentBorderThickness

Gets or sets the value component's border thickness.

ValueDisplayTextFontOffSetFactor

public int ValueDisplayTextFontOffSetFactor

Gets or sets the value display text font offset factor.

ValueStringFormat

public StringFormat ValueStringFormat

Gets or sets the value string format.

Methods

OnDropDownViewClosed

protected virtual void OnDropDownViewClosed()

Called once the time selector has left the screen.

OnDropDownViewOpened

protected virtual void OnDropDownViewOpened()

Called once the time selector is on screen.

OnHandleCreated

protected override void OnHandleCreated(EventArgs e)

Raises the HandleCreated event. TimePickerDropDown overrides it so the control's own handling runs alongside the base behavior.

e
The data for the event.

OnKeyUp

protected override void OnKeyUp(KeyEventArgs e)

Handles the KeyUp event.

e
The KeyEventArgs instance containing the event data.

OnParentChanged

protected override void OnParentChanged(EventArgs e)

Handles the ParentChanged event.

e
The EventArgs instance containing the event data.

PerformDropDown

public void PerformDropDown()

Performs the time picker drop-down.

Events

DropDownViewClosed

public event EventHandler DropDownViewClosed

Raised when the drop-down view is closed.

DropDownViewOpened

public event EventHandler DropDownViewOpened

Raised when the drop-down view is opened.