Search code examples
c#androidmvvmcross

How to bind Android RadioGroup's RadioButton with MVVMCross


I would like to bind a click command on an android radiogroup radiobutton using MVVMCross. I was wondering if there is an example that I can follow.


Solution

  • The ApiExamples project has a RadioGroup sample:

    <MvxRadioGroup
     android:layout_width="fill_parent"
     android:layout_height="wrap_content"
     android:textSize="40dp"
     local:MvxItemTemplate="@layout/item_radio"
     local:MvxBind="ItemsSource Items;SelectedItem SelectedItem"
     />
    

    from https://github.com/MvvmCross/MvvmCross-Tutorials/blob/master/ApiExamples/ApiExamples.Droid/Resources/Layout/Test_RadioGroup.axml