Helpless Automation
Application Development
-
WPF coding mutually exclusive Check Boxes with Data Binding
Last week I was coding a View that required for me to show two ChekBox controls which were mutually exclusive in the same way that two or more RadioButton controls that belong to the same group would interact.
My problem was that one Boolean property which came from a bit column in the database needed to drive which CheckBox would be checked: “Yes” or “No”.
In this example I attempt to show how to code two mutually exclusive checkboxes while binding to the Boolean property described above:
The Name of the Property in the Code Behind file that we are going to bind to is AddInsurance.
Here is the XAML code: