Bunifu Separator is a simple line that allows us to make our User Interface more modular.

Simply locate Bunifu Separator in your toolbox and drag it to your form 

Adding Bunifu Separator at run time

To add Bunifu Separator at run time we will use the Load event handler to run the following code:

C# code

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

VB.NET code

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

Dim separator As New Bunifu.Framework.UI.BunifuSeparator
 
Controls.Add(separator)
End Sub

Custom properties

  • LineColor - This property allows you to set the color of the line (color)
  • LineThickness - This property allows you to set the thickness of the line (integer)
  • Transparency - This property allows you to set the degree of transparency (integer)
  • Vertical - This property allows you to determin whether the line is horizontal or vertical (boolean)

The properties can also be set via code as shown below:

C# code

private void Form1_Load(object sender, EventArgs e)

{

var separator = new Bunifu.Framework.UI.BunifuSeparator();

 

separator.LineColor = Color.Red;

separator.LineThickness = 4;

separator.Transparency = 20;

 

this.Controls.Add(separator);

}


VB.NET code

Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim separator As New Bunifu.Framework.UI.BunifuSeparator
 
separator.LineColor = Color.Red
separator.LineThickness = 4
separator.Transparency = 20
 
Controls.Add(separator)s
End Sub

On running the code you should see something like this

That's it!

We hope you will enjoy using Bunifu Seperator 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?