# Bunifu Switch (1.5.3)

Bunifu Switch is a simple control, similar to a CheckBox control and represents ON and OFF states of an action.&#x20;

## **Adding Bunifu Switch control on a form in Design Time**

Simply locate Bunifu Switch in your toolbox and drag it to your form.&#x20;

![](https://downloads.intercomcdn.com/i/o/73055852/eb3663e848112f70baeb1578/1-4\[1].png)

## **Adding Bunifu Switch control on a form in Run Time**

To add at run time simply place the following lines of code in an Event Handler for example you can sue the Load event then add code

{% tabs %}
{% tab title="C#" %}

```csharp

var bunifuSwitch = new Bunifu.Framework.UI.BunifuSwitch();
this.Controls.Add(bunifuSwitch);

```

{% endtab %}

{% tab title="VB.NET" %}

```

Dim bunifuSwitch As New Bunifu.Framework.UI.BunifuSwitch
Controls.Add(bunifuSwitch)

```

{% endtab %}
{% endtabs %}

on running the code the result should be as below:

![](https://downloads.intercomcdn.com/i/o/73057433/d1766a89b9643a0465ea99f0/2-4\[1].png)

## Properties

### **`OnColor`**

This property sets the color of the swich when the state is ON

### **`OnOffColor`**

This property allows you to set the color of the switch OFF state

### **`TextColor`**

This property allows you to define the font color on the text on your switch&#x20;

### &#x20;**`BorderRadius`**

This property allows you to specify the roundness of the corners of the switch

![](https://downloads.intercomcdn.com/i/o/73058636/4d531e4640fc681ea3a8164c/3-4\[1].png)

![](https://downloads.intercomcdn.com/i/o/73058698/e517d77f8626d999885c4289/4-4\[1].png)

![](https://downloads.intercomcdn.com/i/o/73058774/7e064bfa6283ade91ebcf068/7-2\[1].png)

The result should be as below

![](https://downloads.intercomcdn.com/i/o/73058918/811fbb2a24ea31bb11011e40/8-2\[1].png)

That's it!

We hope you will enjoy using Bunifu Switch control and that it will help you create better user experience for your users.&#x20;

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