async void DoggoSelected(object sender, SelectedItemChangedEventArgs e) { this.doggo = ((ListView)sender).SelectedItem as Doggo; if (this.doggo != null) { string targetPath = System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal); var dbPath = Path.Combine(targetPath, "DogDBFive.db"); var page = new DoggoDetail(dbPath, doggo); page.BindingContext = this.doggo; // set the binding context for the "DoggoDetail" page await Navigation.PushAsync(page); //navigate to "DoggoDetail" and add the dbPath and the selected doggo } }
async void DoggoSelected(object sender, SelectedItemChangedEventArgs e) { var doggo = ((ListView)sender).SelectedItem as Doggo; if (doggo != null) { string targetPath = System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal); var dbPath = Path.Combine(targetPath, "DogDBFive.db"); var page = new DoggoDetail(dbPath, doggo); page.BindingContext = doggo; await Navigation.PushAsync(page); // navigate to the "DoggoDetailpage" and give the dbPath and the data of the dog with it } }