Introduction
Xamarin is a platform to develop the cross-platform and multi-platform apps. (Ex. Windows phone,android, ios). In the Xamarin platform, the code sharing concept is used. Xamarin studio is available in Visual Studio also.
RadioButton control is called if you create the form. Select the option (Ex: Gender Selection) and use the Radio Button Control.
Prerequisites
- Visual Studio 2015 update 3
The following steps need to be followed in order to create RadioButton control in Xamarin Android app using visual studio 2015 update 3.
Step 1
Click file--> Select New--> Next select Project.
or click (Ctrl+Shift+N)

Step 2
After opening the New Project Select Installed-->Templates-->Visual c#-->Android-->choose the Blank App (Android).
Next give your Android app a name(Ex:sample) and give the path of your project. Click ok.

Step 3
Next go to the solution explorer. Solution explorer has all the files and sources in your project.
Next Select Resource-->Layout-->double click to open main.axml page. You want select source to write the xaml code.
Choose the designer window so you can design your app.

Step 4
After opening, the main.axml file will open the main page designer. In this page choose which type you want so you can design this page.

Next you will Delete the Default hello world button. Go to the source panel you can see the button coding. you will delete it.
After deleting the xaml code next delete the c# button action code, go to the MainActivity.cs page. You will delete the button code.
Step 5
Next go to the toolbox window; it has all types of the tools and controls. You will go to the toolbox window; next scroll down
You will see the RadioButtonGroup control. You will drag and drop the RadioButtonGroup control in your main.axml page.

Step 6
After dragging and dropping the RadioButtonGroup control, next go to the properties windows change the Text value (Ex: android:text="Male") for all the radio buttons.

Step 7
Next Change the id of all radio buttons (EX: android:id="@+id/male") .

Code
Main.axml





Vijayaragavan SPosted Oct 15, 2016, 1:36 AM
Good