Creating RadioButtonsGroup control in Xamarin.Forms
The RadioButton control is one of the most used controls in almost any application, however Xamarin Forms does not ship with one, so what do you do? Yes, create it; it’s a good opportunity to have some fun creating a missing control. Let’s address the problem in detail. What do you need? I need a RadioButtonsGroup control not just a single control; that can render n th of radio buttons equal to the items bound to it from its ItemsSource property. We also need to know which item from the ItemsSource collection has been selected by data binding, for that, the control will have SelectedItem Property for the whole selected object, but you may be interested in only one property from that object like ID, so we’ll implement SelectedValue as well, and also SelectedIndex . And Orientation property for the Horizontal & Vertical orientation . When you bind the control to a collection of items, the control need to know what property is used for the displayed text and what pro...