I have a WPF form with as many as 40 textboxes, with a checkbox for each. Each textbox should be enabled/disabled based on the value of its corresponding checkbox. I’ve seen solutions where we can use ICommand to achieve this, but how do I handle 40 individual cases without having 40 ICommand implementations?
I have a WPF form with as many as 40 textboxes, with a checkbox
Share
Just bind the
IsEnabledproperty of theTextBoxto theIsCheckedproperty of theCheckBox: