1
votes

I need to handle three state checkbox in the following manner based on the first value:

  • If checkbox in a checked state then It can be only unchecked.

  • If checkbox in a uncheck state then it can be only checked.

  • if checkbox in a middle state then it can be only checked.

Can you please suggest on how this can be implemented?

2
Hi, I have resolved it, Using Unchecked, checked and indeterminate eventsFurqan Misarwala
You should post your resolution as an answer to benefit others.Jeff Yates

2 Answers

1
votes

The issue may be resolved via in-built checkbox implementation. That is, using Unchecked, checked and indeterminate events. More info on microsoft.com

0
votes

to resolve your problème you chould handle tree event and set the attached property

IsThreeState to true,look at the example:

<checkbox IsThreeState="True"
Indeterminate="checkbox_Indeterminate"
Unchecked="checkbox_Unchecked" Checked="checkbox_Checked"
Content="Click me!"/>