Bunifu Framework Docs
HomePricingFAQsMy Account
  • Introduction
  • Getting started
    • Requirements
    • Installation
    • Installing for .Net 5 & Above
    • Licensing
      • Managing your licenses
      • Bunifu Licensing CLI
      • Bunifu Device Remover (Deprecated)
  • BUNIFU UI
    • Controls
      • Bunifu Button
      • Bunifu Button (variant)
      • Bunifu Cards
      • Bunifu CheckBox
      • Bunifu Circle Progress
      • Bunifu Datagrid View
      • Bunifu Date Picker
      • Bunifu Drop Down
      • Bunifu Flat Button
      • Bunifu Form Caption Button
      • Bunifu Form Control Box
      • Bunifu Form Resize Icon
      • Bunifu Gradient Panel
      • Bunifu Icon Button
      • Bunifu Image Button (New)
      • Bunifu Image Button (Old)
      • Bunifu IOS Switch (1.5.3)
      • Bunifu Label
      • Bunifu Loader
      • Bunifu Picture Box
      • Bunifu Pages
      • Bunifu Panel
      • Bunifu Progress Bar
      • Bunifu Radial Gauge
      • Bunifu Radio Button
      • Bunifu Rating
      • Bunifu Range
      • Bunifu Separator
      • Bunifu Sliders
      • Bunifu Shadow Panel
      • Bunifu Shapes
      • Bunifu Switch (1.5.3)
      • Bunifu ScrollBars
      • Bunifu Toggle Switch
      • Bunifu Toggle Switch (variant)
      • Bunifu Tile Button
      • Bunifu Thin Button (1.5.3)
      • Bunifu ToolTip
      • Bunifu Textbox
      • Bunifu User Control
    • Components
      • Bunifu Color Transition
      • Bunifu Drag
      • Bunifu Elipse [Deprecated]
      • Bunifu Form Dock
      • Bunifu Form Drag
      • Bunifu Form Resizer
      • Bunifu Snackbar
      • Bunifu Transition
  • BUNIFU CHARTS
    • Introduction
      • Quick Tips
    • Chart Components
      • Bunifu Bar Chart
      • Bunifu Bubble Chart
      • Bunifu Canvas Control
      • Bunifu Doughnut Chart
      • Bunifu Horizontal bar Chart
      • Bunifu Line Chart
      • Bunifu Pie chart
      • Bunifu Polar Chart
      • Bunifu Radar Chart
  • BUNIFU DATAVIZ [Deprecated]
    • Basic Charts [Deprecated]
      • Step Line Chart [Deprecated]
      • Step Area Chart [Deprecated]
      • Spline Chart [Deprecated]
      • Pie Chart [Deprecated]
      • Line Chart [Deprecated]
      • Doughnut Chart [Deprecated]
      • Bar Chart [Deprecated]
      • Area Chart [Deprecated]
      • Column Chart [Deprecated]
    • Advanced Charts [Deprecated]
      • Stacked Column 100 Chart [Deprecated]
      • Stacked Column Chart [Deprecated]
      • Stacked Bar Chart 100 [Deprecated]
      • Stacked Bar Chart [Deprecated]
      • Stacked Area Chart 100 [Deprecated]
      • Stacked Area Chart [Deprecated]
      • Scatter Chart [Deprecated]
      • Range Spline Area Chart [Deprecated]
      • Range Column Chart [Deprecated]
      • Range Bar Chart [Deprecated]
      • Range Area Chart [Deprecated]
      • OHLC Chart [Deprecated]
      • Candle Stick Chart [Deprecated]
      • Bubble Chart [Deprecated]
Powered by GitBook
On this page
  • Overview
  • Getting Started
  • Adding Bunifu Radio Button At Design Time
  • Adding Bunifu Radio Button At Runtime
  • Appearance Properties
  • 1. BorderThickness
  • 2. OutlineColor
  • 3. OutlineColorTabFocus
  • 4. OutlineColorUnchecked
  • 5. RadioColor
  • 6. RadioColorTabFocused
  • Behavioral Properties
  • 1. Checked
  • 2. BindingControl
  • 3. BindingControlPosition
  • Take Away

Was this helpful?

  1. BUNIFU UI
  2. Controls

Bunifu Radio Button

Create stylishly themed and customizable Radio buttons with in-built look and feel features and more.

PreviousBunifu Radial GaugeNextBunifu Rating

Last updated 3 years ago

Was this helpful?

Overview

Bunifu Radio Button is a feature-rich .NET control whose primary purpose is the selection of one option from a list of pre-defined choices. It features different states and appearance customizations.

Getting Started

Adding Bunifu Radio Button At Design Time

Bunifu Radio Button is simply added to a form at the designer level by locating/searching BunifuRadioButton in your toolbox and dragging it to your form as shown below:

Next, you need to bind a label which will be your click target. To set it up:

Step two: Access Bunifu Radio's smart tag and set the BindingControl property to the value with the name of the Bunifu Label control:

Ensure that the AllowBindingControlLocation is checked.

Adding Bunifu Radio Button At Runtime

To add Bunifu Radio Button at run time, use the Load event of your Form to write the following code:

private void Form1_Load(object sender, EventArgs e)
{
    //instatiate Bunifu Radio Button using Bunifu.UI.WinForms;
    BunifuRadioButton bunifuRadio = new BunifuRadioButton();
    //set the location for the radio button
    bunifuRadio.Location = new Point(290, 150);
    //instatiate a Bunifu Label to bind to the radio button
    BunifuLabel bunifuLabel = new BunifuLabel();
    //set the text for the label
    bunifuLabel.Text = "Option one";
    //bind the label to Bunifu Radio
    bunifuRadio.BindingControl = bunifuLabel;
    bunifuRadio.AllowBindingControlLocation = true;
    //add the two controls to the form
    this.Controls.AddRange(new Control[] { bunifuRadio, bunifuLabel }) ;
}
Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs)
	'instatiate Bunifu Radio Button using Bunifu.UI.WinForms;
	Dim bunifuRadio As New BunifuRadioButton()
	'set the location for the radio button
	bunifuRadio.Location = New Point(290, 150)
	'instatiate a Bunifu Label to bind to the radio button
	Dim bunifuLabel As New BunifuLabel()
	'set the text for the label
	bunifuLabel.Text = "Option one"
	'bind the label to Bunifu Radio
	bunifuRadio.BindingControl = bunifuLabel
	bunifuRadio.AllowBindingControlLocation = True
	'add the two controls to the form
	Me.Controls.AddRange(New Control() { bunifuRadio, bunifuLabel })
End Sub

Let's take a deep dive and get insights into the available properties on Bunifu Radio Button.

Appearance Properties

1. BorderThickness

This property allows you to get or set the height/ border height of the control. Only integer values are accepted in this property.

2. OutlineColor

This property allows you to get or set the border color of the radio button. It accepts RGB and HEX color values as inputs.

3. OutlineColorTabFocus

This property enables you to get or set the radio button's hover border color; the color is activated once the control is hovered over.

4. OutlineColorUnchecked

This property allows you to get or set the radio button's unchecked state border color.

5. RadioColor

This property allows you to get or set a color value fill for the inner circle; the color gets activated when the control is in the checked state.

6. RadioColorTabFocused

This property allows you to get or set a hover color value for the inner circle; the color gets activated once the control is hovered over.

Behavioral Properties

1. Checked

This property allows you to get or set the initial state of a Bunifu Radio Button. The property accepts a boolean value that, when true, toggles the radio button's state to a selected state.

Bunifu Radio buttons should always be placed under a group box or a panel defining a category for selection.

The checkedChanged event fires whenever the radio button state changes. Here's is a code implementing the event:

private void dailyBunifuRadioButton_CheckedChanged(object sender, Bunifu.UI.WinForms.BunifuRadioButton.CheckedChangedEventArgs e)
{
    if (e.Checked)
    {
        MessageBox.Show("Daily updates set");
    }

}

private void weeklyBunifuRadioButton_CheckedChanged(object sender, Bunifu.UI.WinForms.BunifuRadioButton.CheckedChangedEventArgs e)
{
    if (e.Checked)
    {
        MessageBox.Show("Weekly updates set");
    }
}

private void montlyBunifuRadioButton_CheckedChanged(object sender, Bunifu.UI.WinForms.BunifuRadioButton.CheckedChangedEventArgs e)
{
    if (e.Checked)
    {
        MessageBox.Show("Monthly updates set");
    }
}
Private Sub dailyBunifuRadioButton_CheckedChanged(ByVal sender As Object, ByVal e As Bunifu.UI.WinForms.BunifuRadioButton.CheckedChangedEventArgs)
	If e.Checked Then
		MessageBox.Show("Daily updates set")
	End If

End Sub

Private Sub weeklyBunifuRadioButton_CheckedChanged(ByVal sender As Object, ByVal e As Bunifu.UI.WinForms.BunifuRadioButton.CheckedChangedEventArgs)
	If e.Checked Then
		MessageBox.Show("Weekly updates set")
	End If
End Sub

Private Sub montlyBunifuRadioButton_CheckedChanged(ByVal sender As Object, ByVal e As Bunifu.UI.WinForms.BunifuRadioButton.CheckedChangedEventArgs)
	If e.Checked Then
		MessageBox.Show("Monthly updates set")
	End If
End Sub

2. BindingControl

In no case should the parent control of a Bunifu Radio Button be bound.

3. BindingControlPosition

This property allows you to get or set a position enumeration for the bound control. The position enumeration define the following values: (i.e., the Left and Right positions).

This property ensures adequate spacing between buttons and labels, making it crystal clear which choice corresponds to which label. This helps you to avoid situations where it is extremely difficult to see the correct radio button to click.

Take Away

Bunifu Radio button is a rich essential element of forms and when utilizing radio buttons, it is critical to ensure that this .NET UI element is predictable for users, as this improves users' ability to control the system.

We hope you have gained insights using Bunifu Radio Button and that it will help you create a 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.

Step one: Drag a besides Bunifu Radio Button and give it a meaningful name.

This property allows you to get or set a binding control (i.e., the control's click target e.g the Label, PictureBox, etc..).Typically, the serves as the binding control or the click target. Only a few cases necessitate the use of additional .NET controls. The bound control receives the Radio Button control's click events, which set the control's state(checked or unchecked state).

Bunifu Label
label