If I add a control RadioButton
and specify a property in the ViemModel
, I can do the Binding
normally, but if I have a list of objects and create one RadioButton
for each object in the list, how do I make the RadioButton
selected one do the Binding
like SelectedItem
?
Link to the information I found:
https://stackoverflow.com/questions/2284752/mvvm-binding-radio-buttons-to-a-view-model
In
ViewModel
it I have a collection to generate theItems
and an object for theSelectedItem
In the view, a
ListBox
to show theItems
converted toRadioButton
like so:I hope this helps someone.