Skip to content

Instantly share code, notes, and snippets.

@rkusa
Created September 28, 2010 13:07
Show Gist options
  • Save rkusa/600950 to your computer and use it in GitHub Desktop.
Save rkusa/600950 to your computer and use it in GitHub Desktop.
var statusChanged = from sc in watcher.GetStatusChangedEventObservable()
select sc.EventArgs;
statusChanged.Subscribe(item => Deployment.Current.Dispatcher.BeginInvoke(() => {
// update your status textblock
TextBlock.Text = Enum.GetName(typeof(GeoPositionStatus), item.Status);
if (item.Status == GeoPositionStatus.Ready)
{
// f.e. hide your loading bar
}
else
{
// f.e. show your loading bar
}
}));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment