private void Tbi_delete_Clicked(object sender, EventArgs e) { if (players_list.SelectedItem != null) { if ((Player)players_list.SelectedItem is Player) { playerViewModel.playerObservable.Remove((Player)players_list.SelectedItem); myBaseSqlite.DeletePlayer((Player)players_list.SelectedItem); LoadItemSource(); } } else { DisplayAlert("Info", "Nie wybrano żadnej opcji.", "OK"); } }