If statements for Checkboxes

前端 未结 6 1132
刺人心
刺人心 2021-02-18 23:43

I wanted to know how to write if statements to see if one or another check box is checked or not.

I have two check boxes. I wanted it to check to see if checkbox 1 is c

6条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-19 00:27

    I suggest

    if (checkbox.IsChecked == true)
    {
        //do something
    }
    

    Hope it's helpful ^^

提交回复
热议问题