Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CheckBox CheckChanged event

After Checkbox.IsChecked = true, the Checked event is fired. After Checkbox.IsChecked = false, the UnChecked event is fired. But what event is fired after IsChecked = null?

like image 244
Jotrius Avatar asked Jun 12 '15 16:06

Jotrius


1 Answers

The check box will show an indeterminate state when IsChecked is set to null. Look at this link for more details. You can write code in indeterminate state like this:

<CheckBox Checked="CheckBox_Checked"
 Unchecked="CheckBox_Unchecked"
 Indeterminate="CheckBox_Indeterminate"
 IsThreeState="True"/>

And in the code behind:

private void CheckBox_Indeterminate(object sender, RoutedEventArgs e)
{
  //write some code in Indeterminate states
}

Indeterminate is an event that occurs when the state of a CheckBox is switched to the indeterminate state. You can check this link about Indeterminate Event.

like image 167
Salah Akbari Avatar answered Sep 24 '22 20:09

Salah Akbari