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.
Ohara_MAUI/Sources/Ohara/PageBestiaire.xaml.cs

24 lines
700 B

using Model.Stub;
using Model;
using Plugin.Maui.Audio;
using System.Windows.Input;
namespace Ohara;
public partial class PageBestiaire : ContentPage
{
public Manager manager => (App.Current as App).manager;
public ICommand AjouterFavoris { get; private set; }
public PageBestiaire()
{
InitializeComponent();
AjouterFavoris = new Command((obj) => manager.AddFavoris((ObjetOhara)obj));
listeBest.ItemsSource = manager.GetBestiaires();
}
async void listeBest_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
await Navigation.PushAsync(new PageInfoBestiaire((Bestiaire)listeBest.SelectedItem));
}
}