Dela via


TimePicker.ClockIdentifier Property

Definition

Gets or sets the clock system to use.

public:
 property Platform::String ^ ClockIdentifier { Platform::String ^ get(); void set(Platform::String ^ value); };
winrt::hstring ClockIdentifier();

void ClockIdentifier(winrt::hstring value);
public string ClockIdentifier { get; set; }
var string = timePicker.clockIdentifier;
timePicker.clockIdentifier = string;
Public Property ClockIdentifier As String
<TimePicker ClockIdentifier="12HourClock"/>
-or-
<TimePicker ClockIdentifier="24HourClock"/>

Property Value

String

Platform::String

winrt::hstring

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

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.

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.

Applies to

See also