Beispiel #1
0
 public void CheckSelectAllOrSelectPos(int pos)
 {
     if (FileListBox.Items.Count > pos)
     {
         if (SelectAllCheckBox.IsChecked ?? false)
         {
             FileListBox.SelectAll();
         }
         else
         {
             FileListBox.UnselectAll();
             FileListBox.SelectedIndex = pos;
         }
     }
 }
Beispiel #2
0
        private void SelectAllButton_Click(object sender, RoutedEventArgs e)
        {
            if (FileListBox.Items.Count == 0)
            {
                return;
            }

            if (FileListBox.SelectedItems.Count == 0)
            {
                FileListBox.SelectAll();
            }
            else
            {
                FileListBox.UnselectAll();
            }
        }