private async void animalbutton_Clicked(object sender, EventArgs e) { Button btn = (Button)sender; var animal = btn.Text; Animal animals = await AnimalRepo.GetAnimalsAsync(); foreach (var animal_item in animals.AnimalSpecies) { if (animal_item.Name == animal) { Navigation.PushAsync(new AnimalDetail(animal_item)); } } }
private async Task ShowAnimals() { Animal animals = await AnimalRepo.GetAnimalsAsync(); lvwAnimals.ItemsSource = animals.AnimalSpecies; }