Bunifu RadioButton just like the standard RadioButton is a control used to restrict the selection of values from a defined set of alternatives that are mutually exclusive i.e. only one Bunifu RadioButton in a group can be selected at a time. Selecting a new Bunifu RadioButton causes the other Bunifu RadioButtons to be unselected

Adding Bunifu Radio Button on a Form at Design Time

Simply locate Bunifu Radio Button in your toolbox and drag it to your form. You should see something like this:

Adding Bunifu Radio Button on a Form at Run Time

To add at run time we will use Form Load event. To link the Load event to our form, we simply have to double click on our form (on the window) and we will be directed to the code behind our form where we will add our code as shown below.

C# code

public partial class Form1 : Form
{
      public Form1()
      {
           InitializeComponent();
      }
 
      private void Form1_Load(object sender, EventArgs e)
      {
        var newRadioButton = new      Bunifu.UI.WinForms.BunifuRadioButton();

         newRadioButton.RadioColor = Color.Purple;

         newRadioButton.CheckedOutlineColor = Color.Purple;

          newRadioButton.UncheckedOutlineColor = Color.DimGrey;

this.Controls.Add(newRadioButton);
      }
}


VB.NET code

Public Class Form1
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load

 Dim newRadioButton As New    Bunifu.UI.WinForms.BunifuRadioButton
 
newRadioButton.RadioColor = Color.Purple;
newRadioButton.CheckedOutlineColor = Color.Purple;
newRadioButton.UncheckedOutlineColor = Color.DimGrey;
 
Me.Controls.Add(label)
 
End Sub
End Class

On tunning the code you should see something like this:

Custom properties

  • CheckedOutlineColor - This property allows you to set the color of the checkbox outer circle
  • RadioColor - This property allows you to set the color of the radio button inner circle

That's it!

We hope you will enjoy using Bunifu Radio Button and that it will help you create better user experience for your users. 

Should you have feedback or suggestions please send us via chat on the bottom right corner of the screen.

Did this answer your question?