You are almost there. You already calculated
IsChecked
. Let me rename it according to Microsoft-recommended naming conventions:
isChecked
.
In the same method, it could be something like
myTextBox.Enabled = !isChecked;
myTextBox.ReadOnly = isChecked;
—SA