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
solved C# WPF check if checkbox is checked error [duplicate]
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
solved C# WPF check if checkbox is checked error [duplicate]