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 "/api/MahApps.Metro.Controls/TimePicker"
Derived1["DateTimePicker"]-->Type
click Derived1 "/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))]
[TemplatePart(Name = ElementPopup, Type = typeof(Popup))]
[DefaultEvent("SelectedDateTimeChanged")]
public abstract class TimePickerBase : Control
Attributes
| Type | Description |
|---|---|
| TemplatePart | |
| TemplatePart | |
| TemplatePart | |
| TemplatePart | |
| TemplatePart | |
| TemplatePart | |
| TemplatePart | |
| TemplatePart | |
| TemplatePart | |
| TemplatePart | |
| DefaultEvent |
Constructors
| Name | Summary |
|---|---|
| TimePickerBase |
Events
| Name | Type | Summary |
|---|---|---|
| Selected |
Routed |
Occurs when the
SelectedDateTime property is changed.
|
Fields
| Name | Constant Value | Summary |
|---|---|---|
| CultureProperty |
Identifies the
Culture dependency property.static
|
|
| Hand |
Identifies the
HandVisibility dependency property.static
|
|
| Hours |
Identifies the
HoursItemStringFormat dependency property.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
|
|
| Is |
Identifies the
IsClockVisible dependency property.static
|
|
| Is |
Identifies the
IsDatePickerVisible dependency property.static
|
|
| Is |
Identifies the
IsDropDownOpen dependency property.static
|
|
| IsReadOnlyProperty |
Identifies the
IsReadOnly dependency property.static
|
|
| Minutes |
Identifies the
MinutesItemStringFormat dependency property.static
|
|
| Picker |
Identifies the
PickerVisibility dependency property.static
|
|
| Seconds |
Identifies the
SecondsItemStringFormat dependency property.static
|
|
| Selected |
static
|
|
| Selected |
Identifies the
SelectedDateTime dependency property.static
|
|
| Selected |
Identifies the
SelectedTimeFormat dependency property.static
|
|
| SourceHoursProperty |
Identifies the
SourceHours dependency property.static
|
|
| Source |
Identifies the
SourceMinutes dependency property.static
|
|
| Source |
Identifies the
SourceSeconds dependency property.static
|
|
| hourInput | ||
| original |
||
| textBox |
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).
|
| Hours |
string |
Gets or sets a composite string that specifies how to format the hour items.
|
| 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.
|
| Minutes |
string |
Gets or sets a composite string that specifies how to format the minute items.
|
| PickerVisibility | TimePartVisibility |
Gets or sets a value indicating the visibility of the selectable date-time-parts in the user interface (UI).
|
| Seconds |
string |
Gets or sets a composite string that specifies how to format the second items.
|
| 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 |
Gets or sets a collection used to generate the content for selecting the hours.
|
| SourceMinutes | IEnumerable |
Gets or sets a collection used to generate the content for selecting the minutes.
|
| SourceSeconds | IEnumerable |
Gets or sets a collection used to generate the content for selecting the seconds.
|
| SpecificCultureInfo | CultureInfo |
Methods
| Name | Value | Summary |
|---|---|---|
| ApplyCulture |
void | |
| Clock |
void | |
| Focus |
void |
This method is invoked when the
IsDropDownOpenProperty changes.
|
| GetBinding |
Binding | |
| Get |
TimeSpan? | |
| GetValueForTextBox |
string | |
| OnApplyTemplate |
void |
When overridden in a derived class, is invoked whenever application code or internal processes call
System.Windows.FrameworkElement.ApplyTemplate.
|
| OnPopUpClosed |
void | |
| OnPopUpOpened |
void | |
| On |
void | |
| Raise |
void | |
| Set |
void | |
| SetSelectedDateTime |
void | |
| WriteValueToTextBox |
void |
