TimePickerBase Class

Summary

Represents a base-class for time picking.
Namespace
MahApps.Metro.Controls
Base Types
  • Control
Derived Types
graph BT Type-->Base0["Control"] Type["TimePickerBase"] class Type type-node Derived0["TimePicker"]-->Type click Derived0 "/mahapps.metro.docs.wyam/api/MahApps.Metro.Controls/TimePicker" Derived1["DateTimePicker"]-->Type click Derived1 "/mahapps.metro.docs.wyam/api/MahApps.Metro.Controls/DateTimePicker"

Syntax

[TemplatePart(Name = ElementButton, Type = typeof(Button))]
[TemplatePart(Name = ElementHourHand, Type = typeof(UIElement))]
[TemplatePart(Name = ElementHourPicker, Type = typeof(Selector))]
[TemplatePart(Name = ElementMinuteHand, Type = typeof(UIElement))]
[TemplatePart(Name = ElementSecondHand, Type = typeof(UIElement))]
[TemplatePart(Name = ElementSecondPicker, Type = typeof(Selector))]
[TemplatePart(Name = ElementMinutePicker, Type = typeof(Selector))]
[TemplatePart(Name = ElementAmPmSwitcher, Type = typeof(Selector))]
[TemplatePart(Name = ElementTextBox, Type = typeof(DatePickerTextBox))]
[DefaultEvent("SelectedDateTimeChanged")]
public abstract class TimePickerBase : Control

Attributes

Type Description
TemplatePart
TemplatePart
TemplatePart
TemplatePart
TemplatePart
TemplatePart
TemplatePart
TemplatePart
TemplatePart
DefaultEvent

Constructors

Name Summary
TimePickerBase()

Events

Name Type Summary
SelectedDateTimeChanged EventHandler<TimePickerBaseSelectionChangedEventArgs<DateTime?>>
Occurs when the SelectedDateTime property is changed.

Fields

Name Constant Value Summary
_textBox
CultureProperty
static
HandVisibilityProperty
static
HoursItemStringFormatProperty
static
IntervalOf10
This list contains values from 0 to 50 with an interval of 10. It can be used to bind to SourceMinutes and SourceSeconds.
static
IntervalOf15
This list contains values from 0 to 45 with an interval of 15. It can be used to bind to SourceMinutes and SourceSeconds.
static
IntervalOf5
This list contains values from 0 to 55 with an interval of 5. It can be used to bind to SourceMinutes and SourceSeconds.
static
IsClockVisibleProperty
static
IsDatePickerVisibleProperty
static
IsDropDownOpenProperty
static
IsReadOnlyProperty
static
MinutesItemStringFormatProperty
static
PickerVisibilityProperty
static
SecondsItemStringFormatProperty
static
SelectedDateTimeChangedEvent
static
SelectedDateTimeProperty
static
SelectedTimeFormatProperty
static
SourceHoursProperty
static
SourceMinutesProperty
static
SourceSecondsProperty
static

Properties

Name Value Summary
Culture CultureInfo
Gets or sets a value indicating the culture to be used in string formatting operations.
HandVisibility TimePartVisibility
Gets or sets a value indicating the visibility of the clock hands in the user interface (UI).
HoursItemStringFormat string
IsClockVisible bool
Gets or sets a value indicating whether the clock of this control is visible in the user interface (UI). This is a dependency property.
IsDatePickerVisible bool
Gets or sets a value indicating whether the date can be selected or not. This property is read-only.
IsDropDownOpen bool
Gets or sets a value indicating whether the drop-down for a TimePickerBase box is currently open.
IsMilitaryTime bool
Gets a value indicating whether the System.Globalization.DateTimeFormatInfo.AMDesignator that is specified by the CultureInfo set by the Culture (FrameworkElement.Language if null) has not a value.
IsReadOnly bool
Gets or sets a value indicating whether the contents of the TimePickerBase are not editable.
MinutesItemStringFormat string
PickerVisibility TimePartVisibility
Gets or sets a value indicating the visibility of the selectable date-time-parts in the user interface (UI).
SecondsItemStringFormat string
SelectedDateTime DateTime?
Gets or sets the currently selected date and time.
SelectedTimeFormat TimePickerFormat
Gets or sets the format that is used to display the selected time.
SourceHours IEnumerable<int>
Gets or sets a collection used to generate the content for selecting the hours.
SourceMinutes IEnumerable<int>
Gets or sets a collection used to generate the content for selecting the minutes.
SourceSeconds IEnumerable<int>
Gets or sets a collection used to generate the content for selecting the seconds.
SpecificCultureInfo CultureInfo

Methods