From this and this (and other) questions on Stack Overflow and many other material on internet, I understood how to bind radio button (option button) with View Model.
But all of them create separate property for each possible value of radio button. One question is similar to my requirement but the accepted answer suggests to use ListBox
instead of radio button.
For example, to represent person gender (Datatype Char
, Possible values 'M'
, 'F'
), three properties needs to be created in View Model as PersonGender
, IsPersonMale
, IsPersonFemale
.
I want to control this on only one property PersonGender
.
Can I do this? If yes, how?