protected override void OnNavigatingFrom(NavigatingCancelEventArgs e) { webBrowser.Navigating -= webBrowser_Navigating; _locationManager.OnPositionDetermined -= _locationManager_OnPositionDetermined; _locationManager = null; base.OnNavigatingFrom(e); }
protected override void OnNavigatedTo(NavigationEventArgs e) { webBrowser.Navigating += webBrowser_Navigating; this.LayoutUpdated += InitialPage_LayoutUpdated; _locationManager = new LocationManager(); _locationManager.OnPositionDetermined += _locationManager_OnPositionDetermined; base.OnNavigatedTo(e); }