IGeoPositionWatcher<'T>.TryStart Method (Boolean, TimeSpan)

.NET Framework (current version)

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Start acquiring location data, specifying an initialization timeout. This method returns synchronously.

Namespace:   System.Device.Location
Assembly:  System.Device (in System.Device.dll)

abstract TryStart : 
        suppressPermissionPrompt:bool *
        timeout:TimeSpan -> bool


Type: System.Boolean

If true, do not prompt the user to enable location providers and only start if location data is already enabled.

If false, a dialog box may be displayed to prompt the user to enable location sensors that are disabled.

Type: System.TimeSpan

Time in milliseconds to wait for initialization to complete.

Return Value

Type: System.Boolean

true if succeeded, false if timed out.

.NET Framework
Available since 4.0
Windows Phone Silverlight
Available since 7.0
Return to top