RadioButton inside RadioButtonGroup is not initially checked according to binding.
See original GitHub issueDescribe the bug Radio Buttons should be checked according to the bound Value on the RadioButtonGroup, but they are not.
To Reproduce Steps to reproduce the behavior:
- Create a new RadioButtonGroupView
- Call NewRadioButtonGroup.SetBinding(RadioButtonGroupView.SelectedItemProperty, “PropertyName”) to bind the group to a value in a view model
- Create a property in the view model of Enum type with values like “First”, “Second”, “Third”
- Set the default value in your view model to “First” (should happen anyway if it’s a non-nullable enum
- Add multiple RadioButton instances to your RadioButtonGroupView, making sure one of them has
radioButton.Value = MyEnum.First; - Make sure your page has its BindingContext set to an instance of the view model.
- Run the project
Expected behavior The expected behavior is when the BindingContext on the Group changes (when the view model is assigned), the group should inspect the current SelectedItem property on the view model and if any contained RadioButtons have that as their Value, the RadioButton should be checked.
Instead, no buttons are checked whatsoever.
Workaround - can get around this by binding to bools that mirror the selected value.
Additional note - I have verified that my binding works correctly because if I check the RadioButtons by tapping on them at runtime, the setter on my view model gets set.
Screenshots

Smartphone (please complete the following information):
- Device: Motorola Moto G6
- OS: Android 8.0
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (5 by maintainers)

Top Related StackOverflow Question
I just tried it, everything works great!
I have a simplified scenario which requires no view model nor binding: