determine if “24-hour clock” setting is set

后端 未结 4 1629
野性不改
野性不改 2020-12-11 07:40

What\'s the best way to determine if the user has set the \"24-hour clock\" setting to true in Settings-Date+Time on the Windows Phone ?

Can I get this information t

4条回答
  •  一整个雨季
    2020-12-11 08:22

    The system clock type can be retrieved using:

    string clockType = Windows.System.UserProfile.GlobalizationPreferences.Clocks.FirstOrDefault();
    

    This will return the string 24HourClock if the 24 hour setting is on in the device settings or 12HourClock if the setting is off.

提交回复
热议问题