Bunifu Flat Button
Flat modern looking buttons
Working on a flat design concept UI? Achieve stylish looking flat buttons in your UI with Bunifu Flat Buttons. You can do this at design time and at run time.

Adding Bunifu Flat Button at Design Time

Ensure you have your form open then locate Bunifu Flat Button in your toolbox.

Adding Bunifu Flat Button at Runtime

We will use form Load event to add the following code:

C# code

1
private void Form1_Load(object sender, EventArgs e)
2
{
3
var newButton = new Bunifu.Framework.UI.BunifuFlatButton();
4
this.Controls.Add(newButton);
5
}
Copied!
VB.NET code
1
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
2
3
Dim newButton As New Bunifu.Framework.UI.BunifuFlatButton
4
Controls.Add(newButton)
5
6
End Sub
Copied!
With above code you should see something like this:

Custom Properties

We have three sets of custom properties

Color properties

    colbackground- This property allows you to set the background color of the button (it will take effect whenever you hover the button for the first time).
    colhover - This property sets the color of the button when hovered
    colselected& Activecolor- This property sets the color of the button when clicked
    Normalcolor- This property sets the default color of the button
    OnHoverColor- This property works the same way as colhover property
    OnHoverTextColor- This property allows you to set the color of the text on the button when hovered

Image Properties

    limage or IconImage - This property allows you to set an image on the left side of the button
    rimage or Iconimage_right - This property allows you to set an image on the right side of the button
Visibility Properties
    iconVisible and iconRightVisible - This property allows you to choose whether to show or hide the image on the button
    iconZoom - This property allows you to set the zoom of the image
The sample code below show the properties in action:
C#
VB.NET
1
private void Form1_Load(object sender, EventArgs e){
2
this.bunifuFlatButton1.Normalcolor = Color.Purple;
3
this.bunifuFlatButton1.OnHovercolor = Color.Red;
4
this.bunifuFlatButton1.Activecolor = Color.Black;
5
this.bunifuFlatButton1.colbackground = Color.Blue;
6
this.bunifuFlatButton1.colhover = Color.Red;
7
this.bunifuFlatButton1.colselected = Color.Red;
8
this.bunifuFlatButton1.Activecolor = Color.Yellow;
9
this.bunifuFlatButton1.Iconcolor = Color.Violet;
10
this.bunifuFlatButton1.IconZoom = 100;
11
this.bunifuFlatButton1.IconRightVisible = false;
12
}
Copied!
1
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
2
BunifuFlatButton1.Normalcolor = Color.Purple;
3
BunifuFlatButton1.OnHovercolor = Color.Red;
4
BunifuFlatButton1.Activecolor = Color.Black;
5
BunifuFlatButton1.colbackground = Color.Blue;
6
BunifuFlatButton1.colhover = Color.Red;
7
BunifuFlatButton1.colselected = Color.Red;
8
BunifuFlatButton1.Activecolor = Color.Yellow;
9
BunifuFlatButton1.Iconcolor = Color.Violet;
10
BunifuFlatButton1.IconZoom = 100;
11
BunifuFlatButton1.IconRightVisible = false;
12
End Sub
Copied!
If you did it correctly you should see something like this.
That's it!
We hope you will enjoy using Bunifu Flat Button 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.
Last modified 1yr ago