Divide panel layout content into clear groups.
Bunifu Separator is a rich and modest .NET line control that allows us to partition user interface layouts, resulting in a modular interface design.
This section describes adding Bunifu Separator at the designer level and during a runtime event.
Bunifu Separator can be added to a form at the designer level by locating or searching
BunifuSeparatorin your toolbox and drag it to your form as shown below.
To add Bunifu Separator at run time we will use the Load event handler of the form and render the separator. Generally, these situations are uncommon, but to include the control at run time, write the following code:
private void Form1_Load(object sender, EventArgs e)
//instantiate the separator control using Bunifu.UI.WinForms
BunifuSeparator bunifuSeparator = new BunifuSeparator();
//set the location of the control
bunifuSeparator.Location = new Point(195, 150);
//set the color for the control
bunifuSeparator.LineColor = Color.DodgerBlue;
//set the line style for the separator
bunifuSeparator.LineStyle = BunifuSeparator.LineStyles.DashDot;
//add the control to the form
Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs)
'instantiate the separator control using Bunifu.UI.WinForms
Dim bunifuSeparator As New BunifuSeparator()
'set the location of the control
bunifuSeparator.Location = New Point(195, 150)
'set the color for the control
bunifuSeparator.LineColor = Color.DodgerBlue
'set the line style for the separator
bunifuSeparator.LineStyle = BunifuSeparator.LineStyles.DashDot
'add the control to the form
Let's take a deep dive and get insights into the available properties on Bunifu Separator.
This property allows you to get or set the line's fill color. It is compatible with the use of RGB and HEX color values.
This property allows you to get or set the line's height/thickness. It only accepts integer values and has a default value of its thickness is 1. The value provided determines the thickness of the line thus, the greater the value provided, the thicker the line.
This property allows you to get or set the position enumeration for the line control. The position enumeration defines the following values:(i.e., the Vertical and Horizontal positions). The default orientation value set is Horizontal.
This property allows you to get or set an appearance enumeration of the line control. The default value of the property is the Solid enumeration. The line style enumerations define the following:
This property allows you to get or set a dash edge cap style of the line control.
This property is only applicable when the
LineStyleproperty is set to one of the available Dash enumerations.
DashCap'sdefault value is the Flat value. Other value enumerations include: Round and Triangle.
We hope that you have gained insights into using Bunifu Separator as a layout component for form. Should you have feedback or suggestions please send us via chat on the bottom right corner of the screen.