private void LocationService_PositionChanged(object sender, LocationServicePositionChangedEventArgs e) { CurrentLocation = e.Position.ToString(); }
/// <summary> /// Handles the PositionChanged event of the LocationService control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="LocationServicePositionChangedEventArgs"/> instance containing the event data.</param> private void LocationService_PositionChanged(object sender, LocationServicePositionChangedEventArgs e) { Deployment.Current.Dispatcher.BeginInvoke(delegate { Latitude = e.Position.Latitude; Longitude = e.Position.Longitude; }); }