using CommunityToolkit.Maui.Views; using QwirkleClassLibrary.Games; using System.Collections.ObjectModel; namespace Qwirkle; public partial class PopUpEndGame : Popup { public PopUpEndGame() { InitializeComponent(); var scoreboard = game.ObservableScoreBoard.OrderByDescending(x => x.Value).ThenBy(x => x.Key); ScoreboardList = new ObservableCollection>(scoreboard); } private Game game = ((App)Application.Current!).Game; private ObservableCollection>? scoreboardList; public ObservableCollection>? ScoreboardList { get => scoreboardList; set { if (scoreboardList != value) { scoreboardList = value; OnPropertyChanged(nameof(ScoreboardList)); } } } public async void OnButtonNextClick(object sender, EventArgs e) { await CloseAsync(); } }