The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
GeoCoordinateWatcher.Status Property
.NET Framework (current version)
Gets the current status of the GeoCoordinateWatcher.
Assembly: System.Device (in System.Device.dll)
Property Value
Type: System.Device.Location.GeoPositionStatusA GeoPositionStatus which indicates the availability of data from the GeoCoordinateWatcher.
Implements
IGeoPositionWatcher<T>.StatusThe following example handles StatusChanged events and prints a message based on the Status.
using System; using System.Device.Location; namespace ShowStatusUpdates { class Program { static void Main(string[] args) { ShowStatusUpdates(); } static void ShowStatusUpdates() { GeoCoordinateWatcher watcher = new GeoCoordinateWatcher(); watcher.Start(); watcher.StatusChanged += new EventHandler<GeoPositionStatusChangedEventArgs>(watcher_StatusChanged); Console.WriteLine("Enter any key to quit."); Console.ReadLine(); } static void watcher_StatusChanged(object sender, GeoPositionStatusChangedEventArgs e) { switch (e.Status) { case GeoPositionStatus.Initializing: Console.WriteLine("Working on location fix"); break; case GeoPositionStatus.Ready: Console.WriteLine("Have location"); break; case GeoPositionStatus.NoData: Console.WriteLine("No data"); break; case GeoPositionStatus.Disabled: Console.WriteLine("Disabled"); break; } } } }
.NET Framework
Available since 4.0
Windows Phone Silverlight
Available since 7.0
Available since 4.0
Windows Phone Silverlight
Available since 7.0
Show: