GlobalizationPreferences 類別

定義

用來保存各種使用者全球化喜好設定的靜態類別。

public ref class GlobalizationPreferences abstract sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class GlobalizationPreferences final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public static class GlobalizationPreferences
Public Class GlobalizationPreferences
繼承
Object Platform::Object IInspectable GlobalizationPreferences
屬性

Windows 需求

裝置系列
Windows 10 (已於 10.0.10240.0 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v1.0 引進)

範例

// Obtain the user's home geographic region.
var region = Windows.System.UserProfile.GlobalizationPreferences.HomeGeographicRegion;

備註

版本歷程記錄

Windows 版本 SDK 版本 新增值
1709 16299 TrySetHomeGeographicRegion
1709 16299 TrySetLanguages
1803 17134 GetForUser

屬性

Calendars

依喜好設定順序,取得使用者慣用的行事曆集合。

Clocks

依喜好設定順序,取得使用者慣用的時鐘集合。

Currencies

依喜好設定順序,取得使用者慣用的貨幣集合。

HomeGeographicRegion

取得使用者的主地理區域。

Languages

依喜好設定順序,取得使用者慣用的語言集合。

WeekStartsOn

取得視為當周第一天的一周日期。

方法

GetForUser(User)

擷取物件,此物件表示指定使用者的全球化喜好設定。 此 API 是多使用者應用程式支援 (MUA) 的一部分。

TrySetHomeGeographicRegion(String)

嘗試在 IoT 裝置上設定使用者的主地理區域。

注意

這個方法僅適用于 內嵌模式

TrySetLanguages(IIterable<String>)

嘗試在 IoT 裝置上設定慣用的語言。

注意

這個方法僅適用于 內嵌模式

適用於

另請參閱