dimanche 28 août 2016

Checking all the checkboxes at once but not in XAML

I'm trying to learn how to use checkboxes more efficiently, and I found this example on how to accomplish something that I am trying to accomplish but I don't want to do it in XAML.

<CheckBox Content="Do Everything" IsChecked="{Binding DoEverything}" IsThreeState="True"/>
<CheckBox Content="Eat" IsChecked="{Binding DoEat}" Margin="20,0,0,0"/>
<CheckBox Content="Pray" IsChecked="{Binding DoPray}" Margin="20,0,0,0"/>
<CheckBox Content="Love" IsChecked="{Binding DoLove}" Margin="20,0,0,0"/>

So what it does is it checks all 3 if 1 is checked,

How do I accomplish this but with C# code.




Aucun commentaire:

Enregistrer un commentaire