Skip to content

Time Picker (Dial & Pane) ​

Two Android-style Material 3 time selection components in Material3.Avalonia.Controls, alongside the themed built-in TimePicker.

TimePickerPane — complete picker ​

The full M3 time picker: hour/minute display chips, AM/PM segment, clock dial, keyboard-input mode, and Cancel/OK actions.

xml
<m3c:TimePickerPane x:Name="Picker"
                    SelectedHour="14" SelectedMinute="30"
                    Is24Hour="False" />
csharp
Picker.Confirmed += (_, _) => UseTime(Picker.SelectedTime);   // TimeSpan
Picker.Canceled  += (_, _) => Close();
Picker.SelectedTimeChanged += (_, _) => Preview(Picker.SelectedTime);
PropertyTypeDefault
SelectedHourint00–23, two-way
SelectedMinuteint00–59, two-way
SelectedTimeTimeSpan00:00Two-way styled property; updates hour and minute as one notification batch
Is24HourboolfalseHides AM/PM, dial gets a double ring
IsInputModeboolfalsefalse = "Select time" dial · true = "Enter time" text boxes
Titlestring?nullnull shows the mode-appropriate default title

Behavior matching Android: committing an hour on the dial auto-advances to minutes; the bottom-left icon button toggles dial/keyboard mode; in input mode typing two digits in the hour box jumps to minutes.

TimePickerDial — just the clock face ​

Use the dial standalone when you build your own chrome:

xml
<m3c:TimePickerDial Mode="Hours" Is24Hour="True"
                    SelectedHour="17" SelectedMinute="30" />
Property / EventTypeNotes
ModeTimePickerDialModeHours or Minutes
Is24HourboolOuter ring 1–12, inner ring 00/13–23
SelectedHour / SelectedMinuteintTwo-way
SelectorBrush / SelectedForeground / SecondaryForegroundIBrush?Themed to Primary / OnPrimary / OnSurfaceVariant
SelectedTimeChangedeventFires on every value change
SelectionCommittedeventFires on pointer release — hook this to auto-advance

Interaction: dragging tracks the finger 1:1 (no tick snapping mid-drag) and settles to the nearest tick with a 150 ms decelerate animation on release; clicks animate along the shortest arc; arrow keys nudge ±1. In 12-hour mode, arrow-key wrapping stays within the current AM or PM half-day.

Built-in TimePicker / DatePicker ​

The standard Avalonia TimePicker, DatePicker, CalendarDatePicker and Calendar are fully themed too (outlined fields, 28dp presenter dialogs, pill day cells), if you prefer the looping-list pickers.