Beispiel #1
0
        private void Item_Checked(object sender, RoutedEventArgs e)
        {
            if (ListSelectedValues != null)
            {
                if (!ListSelectedValues.Contains((sender as CheckBox).Content.ToString()))
                {
                    ListSelectedValues.Add((sender as CheckBox).Content.ToString());
                }
            }
            else
            {
                ListSelectedValues = new ObservableCollection <string>();

                if (!ListSelectedValues.Contains((sender as CheckBox).Content.ToString()))
                {
                    ListSelectedValues.Add((sender as CheckBox).Content.ToString());
                }
            }
        }
Beispiel #2
0
 private void Item_Unchecked(object sender, RoutedEventArgs e)
 {
     ListSelectedValues.Remove((sender as CheckBox).Content.ToString());
 }