Windows.UI.Xaml.Controls.TimePicker.ClockIdentifier

June 22, 2022 ยท View on GitHub

-description

Gets or sets the clock system to use.

-xaml-syntax

<TimePicker ClockIdentifier="12HourClock"/>
-or-
<TimePicker ClockIdentifier="24HourClock"/>

-property-value

The name of the clock system to use. See Remarks.

-remarks

The type of the property is String, but you must use values that correspond to the static string properties of Windows.Globalization.ClockIdentifiers. These are: TwelveHour (the string "12HourClock")and TwentyFourHour (the string "24HourClock"). "12HourClock" is the default value.

-examples

This example shows time pickers using both 12-hour and 24-hour clocks.

<TimePicker Header="12HourClock" SelectedTime="14:30"/>
<TimePicker Header="24HourClock" SelectedTime="14:30" ClockIdentifier="24HourClock"/>

A time picker showing a 12 hour clock, and a picker showing a 24 hour clock.

-see-also

Windows.Globalization.ClockIdentifiers