Aracılığıyla paylaş


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 bool TrySetHomeGeographicRegion(Platform::String ^ region);
 static bool TrySetHomeGeographicRegion(winrt::hstring const& region);
public static bool TrySetHomeGeographicRegion(string region);
function trySetHomeGeographicRegion(region)
Public Shared Function TrySetHomeGeographicRegion (region As String) As Boolean

Parameters

region
String

Platform::String

winrt::hstring

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

Returns

Boolean

bool

true if HomeGeographicRegion was set; otherwise, false.

Windows requirements

Device family
Windows 10 Fall Creators Update (introduced in 10.0.16299.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v5.0)

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>

Applies to