private void OutdoorLvBinding_SelectionChanged(object sender, SelectionChangedEventArgs e) { Debug.WriteLine("Selected: {0}", e.AddedItems[0]); OutdoorModel outdoorModel = (OutdoorModel)e.AddedItems[0]; if (outdoorModel != null) { Debug.WriteLine(outdoorModel.longitude + "," + outdoorModel.latitude); this.Frame.Navigate(typeof(ElderlyOutdoorLocationMap), outdoorModel); } }
private async void FeatureLocationList_SelectionChanged(object sender, SelectionChangedEventArgs e) { GooglePlaceIdModel model = (GooglePlaceIdModel)e.AddedItems[0]; if (model != null) { GoogleMapPlaceModel returnModel = await ConvertPlaceIdToAddress(model); //Debug.WriteLine(model.result.geometry.location.lat); OutdoorModel m = new OutdoorModel() { longitude = returnModel.result.geometry.location.lng.ToString(), latitude = returnModel.result.geometry.location.lat.ToString() }; Debug.WriteLine(m.longitude); Debug.WriteLine(m.latitude); this.Frame.Navigate(typeof(ElderlyOutdoorLocationMap), m); } }
protected override void OnNavigatedTo(NavigationEventArgs e) { outdoorModel = e.Parameter as OutdoorModel; }