Beispiel #1
0
        async void OnItemSelected(object sender, EventArgs e)
        {
            BindableObject layout = (BindableObject)sender;

            PokeType pokeType = (PokeType)layout.BindingContext;
            await pokeType.LoadStrengths();

            TypeDetailViewModel typeDetailViewModel = new TypeDetailViewModel(pokeType);
            await Navigation.PushAsync(new TypeDetailPage(typeDetailViewModel));
        }
Beispiel #2
0
        async void OnItemSelected(object sender, EventArgs e)
        {
            BindableObject layout = (BindableObject)sender;

            PokeType pokeType = (PokeType)layout.BindingContext;
            await pokeType.LoadStrengths();

            Page previousPage = Navigation.NavigationStack.Last();
            await Navigation.PushAsync(new TypeDetailPage(new TypeDetailViewModel(pokeType)));

            Navigation.RemovePage(previousPage);
        }