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.

29 lines
787 B

using ViewModel;
namespace App.Pages;
public partial class ChampionsListPage : ContentPage
{
public ChampionManagerVM ChampionManagerVM { get; private set; }
public ChampionsListPage(ChampionManagerVM championManagerVM)
{
ChampionManagerVM = championManagerVM;
InitializeComponent();
BindingContext = ChampionManagerVM;
}
async void AddClicked(System.Object sender, System.EventArgs e)
{
await Shell.Current.GoToAsync(nameof(ChampionAddEditPage));
}
async void ListView_ItemSelected(System.Object sender, Microsoft.Maui.Controls.SelectedItemChangedEventArgs e)
{
await Shell.Current.GoToAsync(nameof(ChampionDetailPage), true, new Dictionary<string, object>
{
{ "ChampionVM", e.SelectedItem }
});
}
}