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
  • Adding Bunifu Flat Button at Design Time
  • Adding Bunifu Flat Button at Runtime
  • C# code
  • Custom Properties
  • Color properties
  • Image Properties

Was this helpful?

  1. BUNIFU UI
  2. Controls

Bunifu Flat Button

Flat modern looking buttons

PreviousBunifu Drop DownNextBunifu Form Caption Button

Last updated 4 years ago

Was this helpful?

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

private void Form1_Load(object sender, EventArgs e)
{
    var newButton = new Bunifu.Framework.UI.BunifuFlatButton();
    this.Controls.Add(newButton);
}

VB.NET code

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

    Dim newButton As New Bunifu.Framework.UI.BunifuFlatButton
    Controls.Add(newButton)

End Sub

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:

private void Form1_Load(object sender, EventArgs e){    
    this.bunifuFlatButton1.Normalcolor = Color.Purple;    
    this.bunifuFlatButton1.OnHovercolor = Color.Red;    
    this.bunifuFlatButton1.Activecolor = Color.Black;    
    this.bunifuFlatButton1.colbackground = Color.Blue;    
    this.bunifuFlatButton1.colhover = Color.Red;    
    this.bunifuFlatButton1.colselected = Color.Red;    
    this.bunifuFlatButton1.Activecolor = Color.Yellow;    
    this.bunifuFlatButton1.Iconcolor = Color.Violet;    
    this.bunifuFlatButton1.IconZoom = 100;    
    this.bunifuFlatButton1.IconRightVisible = false;
}
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load    
    BunifuFlatButton1.Normalcolor = Color.Purple;
    BunifuFlatButton1.OnHovercolor = Color.Red;
    BunifuFlatButton1.Activecolor = Color.Black;    
    BunifuFlatButton1.colbackground = Color.Blue;
    BunifuFlatButton1.colhover = Color.Red;
    BunifuFlatButton1.colselected = Color.Red;
    BunifuFlatButton1.Activecolor = Color.Yellow;
    BunifuFlatButton1.Iconcolor = Color.Violet;    
    BunifuFlatButton1.IconZoom = 100;
    BunifuFlatButton1.IconRightVisible = false;
End Sub

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.