This is a migrated thread and some comments may be shown as answers.

CheckBox and IsChecked property

1 Answer 157 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Stanislav
Top achievements
Rank 1
Stanislav asked on 08 Nov 2012, 10:30 PM
Hello all,

The 'IsChecked' property in CheckBox is of bool? type. What is it for? I would have thought that it is of bool type.

if (checkBox.IsChecked.HasValue && checkBox.IsChecked.Value)
    checkBox.Check(true);

Is it really worth it?

Kind Regards,
Stanislav Hordiyenko

1 Answer, 1 is accepted

Sort by
0
Accepted
Boyan Boev
Telerik team
answered on 09 Nov 2012, 01:12 PM
Hello Stanislav,

When the IsThreeState property is set to true, a user can click a CheckBox to pick three possible states: checked with value of the IsChecked true, unchecked with value of the IsChecked false and indeterminate with value of the IsChecked null.

For more information please read this article.

Hope this helps.

Regards,
Boyan Boev
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
Tags
General Discussions
Asked by
Stanislav
Top achievements
Rank 1
Answers by
Boyan Boev
Telerik team
Share this question
or