Pretty straightforward: I’m looking to do the same as this but in winforms. Everything that google seems to pull up is wpf specific (ie. I don’t want to reference presentationframework.dll)
Explained if you don’t want to read the link:
The following is a representation of the intent of what I’d like to do, though it obviously doesn’t work.
CheckBox1.DataBindings.Add(new Binding("Checked", this.object, "!SomeBool"));
You have two options:
Bindingobject manually and attach to theFormatandParseevents and swap the value in each.The first option is cleaner, IMO, as it doesn’t force your class’s API to follow your UI design, though the second option is (marginally) easier.
Example of Option 1
Example of Option 2
Again, I very much favor option 1, since option 2 requires that you tailor your class to your UI design.