GlobalizationPreferences.TrySetHomeGeographicRegion(String) GlobalizationPreferences.TrySetHomeGeographicRegion(String) GlobalizationPreferences.TrySetHomeGeographicRegion(String) GlobalizationPreferences.TrySetHomeGeographicRegion(String) GlobalizationPreferences.TrySetHomeGeographicRegion(String) Method

Definition

Attempts to set the user's home geographic region on an IoT device.

Note

This method is available only in Embedded mode.

public : static Platform::Boolean TrySetHomeGeographicRegion(Platform::String region)
static bool TrySetHomeGeographicRegion(winrt::hstring region) const;
public static bool TrySetHomeGeographicRegion(String region)
Public Shared Function TrySetHomeGeographicRegion(region As String) As bool
var bool = Windows.System.UserProfile.GlobalizationPreferences.trySetHomeGeographicRegion(region);

Parameters

region
String String String

The GeographicRegion identifier that represents the user's home location.

Returns

bool bool bool

true if HomeGeographicRegion was set; otherwise, false.

Additional features and requirements

Device family
Windows 10 Fall Creators Update (introduced v10.0.16299.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v5)

Remarks

Your app must declare the systemManagement capability, which lets apps access basic system administration privileges including locale, timezone, shut down, and reboot.

The systemManagement capability must include the iot namespace when you declare it in your app's package manifest.

<Capabilities><iot:Capability Name="systemManagement"/></Capabilities>