TimePicker

Time input with hours/minutes/seconds fields and clock icon.

Overview

TimePicker extends Control and provides a structured time input with separate editable fields for hours and minutes, and an optional seconds field controlled by the ShowSeconds property. A clock icon () is displayed alongside the fields for quick visual identification. When no time is selected, customizable placeholder text is shown. Users navigate between fields with Left/Right arrows, adjust values with Up/Down arrows (values wrap — e.g. hours wrap from 23 to 0 and minutes wrap from 59 to 0), or type digits directly for fast entry. The control uses 24-hour format by default.

Basic Example

<StackPanel Orientation="Vertical">
  <TextBlock Text="Select a time:" />
  <TimePicker PlaceholderText="Pick a time..." />
</StackPanel>

Properties

PropertyTypeDefaultDescription
SelectedTimeTimeSpan?nullThe currently selected time, or null if no time is chosen.
ShowSecondsboolfalseWhen true, displays an additional seconds field (HH:MM:SS).
Iconstring"\uF017"Nerd Font glyph displayed as the clock icon.
PlaceholderTextstring"Select time..."Text shown when SelectedTime is null.
WidthSizeAutoExplicit width of the control.
HeightSizeAutoExplicit height of the control.
FocusColorColorCyanBorder color when the control has keyboard focus.
HoverColorColorYellowBorder color when the mouse hovers over the control.

Examples

Hours and Minutes

<StackPanel Orientation="Vertical">
  <TextBlock Text="Alarm time:" />
  <TimePicker SelectedTime="07:30" />
</StackPanel>

With Seconds

<StackPanel Orientation="Vertical">
  <TextBlock Text="Precise time:" />
  <TimePicker SelectedTime="14:30:45"
              ShowSeconds="True" />
</StackPanel>

Custom Icon

<StackPanel Orientation="Vertical">
  <TextBlock Text="Deadline:" />
  <TimePicker SelectedTime="17:00"
              Icon=""
              FocusColor="Red"
              PlaceholderText="Set deadline..." />
</StackPanel>

Keyboard Shortcuts

KeyAction
Left ArrowMove focus to the previous field (seconds → minutes → hours).
Right ArrowMove focus to the next field (hours → minutes → seconds).
Up ArrowIncrement the focused field by one. Hours wrap 23 → 0; minutes and seconds wrap 59 → 0.
Down ArrowDecrement the focused field by one. Hours wrap 0 → 23; minutes and seconds wrap 0 → 59.
0–9Direct digit entry — auto-advances to the next field when the current field is full.

Key Concepts