Answer the question
In order to leave comments, you need to log in
C# checkbox .Checked xaml?
Hello,
you can somehow force the checkbox not to change state if the function has not been executed,
processing the click programmatically cannot change:
public void chkEv(object sender, RoutedEventArgs e){
CheckBox cb = (CheckBox)sender;
cb.Checked = true;
here comes the error Error
CS0079
The event 'ToggleButton.Checked' can only appear on the left hand side of += or -=
if so how?
Answer the question
In order to leave comments, you need to log in
Checked is an event.
The state can be set with the IsChecked property :
CheckBox cb = (CheckBox)sender;
cb.IsChecked = true;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question