Advertisement
Guest User

Untitled

a guest
Jul 9th, 2014
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.71 KB | None | 0 0
  1. private void NAICSList_SelectionChanged(object sender, SelectionChangedEventArgs e)
  2.         {
  3.  
  4.  
  5.             if(NAICSList.SelectedIndex != -1)
  6.             {
  7.             ListBoxItem item = this.NAICSList.ItemContainerGenerator.ContainerFromIndex(NAICSList.SelectedIndex) as ListBoxItem;
  8.             CheckBox tagregCheckBox = FindFirstElementInVisualTree<CheckBox>(item);
  9.  
  10.                 if (tagregCheckBox.IsChecked != true)
  11.                 {
  12.                     tagregCheckBox.IsChecked = true;
  13.                 }
  14.                 else
  15.                 {
  16.                     tagregCheckBox.IsChecked = false;
  17.                 }
  18.             }
  19.             NAICSList.SelectedIndex = -1;
  20.            
  21.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement