[ad_1]
IsChecked is a nullable boolean, which means it can have three states. Nullable types are denoted by the ? you see in the error.
Try this:
if ((bool)checkbox1.IsChecked == true)
0
[ad_2]
solved C# WPF check if checkbox is checked error [duplicate]