void geolocator_PositionChanged(Geolocator sender, PositionChangedEventArgs args) { if (!App.RunningInBackground) { Outils.PostGeolocToJeedom(args.Position.Coordinate); Dispatcher.BeginInvoke(() => { // LatitudeTextBlock.Text = args.Position.Coordinate.Latitude.ToString("0.00"); // LongitudeTextBlock.Text = args.Position.Coordinate.Longitude.ToString("0.00"); }); } else { /*Microsoft.Phone.Shell.ShellToast toast = new Microsoft.Phone.Shell.ShellToast(); * toast.Content = args.Position.Coordinate.Point.Position.Latitude.ToString("0.00"); * toast.Title = "Location: "; * //toast.NavigationUri = new Uri("/Page2.xaml", UriKind.Relative); * toast.Show();*/ Outils.PostGeolocToJeedom(args.Position.Coordinate); } }