protected override void OnRemovedFromJournal(System.Windows.Navigation.JournalEntryRemovedEventArgs e) { if (App.Geolocator != null) { App.Geolocator.PositionChanged -= geolocator_PositionChanged; App.Geolocator = null; } }
// Events // :Navigation protected override void OnRemovedFromJournal(System.Windows.Navigation.JournalEntryRemovedEventArgs e) { // Set GPS service off _locationService.StopService(); // Remove handlers _locationService.GPSLocationChanged -= GPSLocationChanged; _locationService.GPSLocationChanged -= _viewModel.GPSLocationChanged; this.DataContext = null; _runUpdater.Tick -= _timerTick; _runUpdater.Stop(); }
protected override void OnRemovedFromJournal(System.Windows.Navigation.JournalEntryRemovedEventArgs e) { App.Geolocator = null; }