You can use null coalescing operator. This operator returns right-hand operand if the left-hand operand is null. So you can return false
when the CheckBox
is in indeterminate state (when the value of IsChecked
property is set to null):
if (chkRevLoop.IsChecked ?? false)
{
}