Example #1
0
File: GUI.cs Project: tiganov/CAT
        private void DeleteButton_Click(object sender, RoutedEventArgs e)
        {
            // make sure "Me" isn't selected
            if (PlayersListView.SelectedIndex != 0)
            {
                // remove selected from playersdata, select last element, then focus back
                // (for convenience in case user wants to delete all of them quickly)

                PlayersData.RemoveAt(PlayersListView.SelectedIndex);
                PlayersListView.SelectedIndex = PlayersData.Count - 1;
                PlayersListView.Focus();
            }
        }
 private void PreviousPlayersListView_ItemClick(object sender, ItemClickEventArgs e)
 {
     PlayersPageViewModel.instance.AddExistingPlayerButton(e.ClickedItem as Player);
     PlayersListView.Focus(FocusState.Pointer);
 }