I think you may be using
WPF
as the parameter
e
in the method signature is of type
RoutedEventArgs
. If so, then the
CheckBox
control of
WPF
has got
Checked
and
Unchecked
events as explained here.
WPF CheckBox Events[
^]
You are handling only the
Checked
event of the
CheckBox
, hence desired action takes place when the
CheckBox
is checked and nothing happens when the CheckBox is unchecked as the
Unchecked
event is not handled.
The
Checked
and
Unchecked
can be used as follows
void chkbox_Unchecked(object sender, RoutedEventArgs e)
{
acceptRadioButton.IsEnabled = true;
declineRadioButton.IsEnabled = true;
}
void chkbox_Checked(object sender, RoutedEventArgs e)
{
acceptRadioButton.IsEnabled = false;
declineRadioButton.IsEnabled = false;
}