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

Adding Bunifu Switch control on a form in Design Time

Simply locate Bunifu Switch in your toolbox and drag it to your form. 

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

C# code

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

this.Controls.Add(bunifuSwitch);

VB.NET code

Dim bunifuSwitch As New Bunifu.Framework.UI.BunifuSwitch

Controls.Add(bunifuSwitch)

on running the code the result should be as below:

Custom 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 
  • BorderRadius - This property allows you to specify the roundness of the corners of the switch

The result should be as below

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. 

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

Did this answer your question?