You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
667 B

using CommunityToolkit.Maui.Layouts;
using Model;
namespace Views;
public partial class Animaux : ContentPage
{
public Animaux()
{
InitializeComponent();
BindingContext = (App.Current as App).Theque;
}
public void OnClick(object sender, ItemTappedEventArgs e)
{
(App.Current as App).AnimalSelectionner = e.Item as Animal;
Navigation.PushAsync(new DetailAnimal());
}
public async void Button_OnClick(object sender, EventArgs e)
{
(App.Current as App).AnimalSelectionner = (App.Current as App).Theque.AjouterAnimal();
await Shell.Current.GoToAsync("///DetailAnimal");
}
}