Configuring BorderLayout in Windows Forms LayoutManagers

28 Apr 20211 minute to read

The configuration settings for the BorderLayout control have been given in this section.


The horizontal and vertical gaps between the child controls can be set using the following properties.

BorderLayout properties Description
Gets or sets the horizontal spacing between the layout border and the components.
Gets or sets the vertical spacing between the layout border and the components.
this.borderLayout1.HGap = 10;

this.borderLayout1.VGap = 10;
Me.borderLayout1.HGap = 10

Me.borderLayout1.VGap = 10

Aligning with space between child controls

Configuring child controls

The child controls can be aligned to various positions (North, South, East, West, and Center) using the following property.

Child control property Description
Position on borderLayout
Gets or sets the border position for a child components.


This property is added as an extended property in the properties window of the child control added to BorderLayout.

this.borderLayout1.SetPosition(this.btnNorth, Syncfusion.Windows.Forms.Tools.BorderPosition.North);
Me.borderLayout1.SetPosition(Me.btnNorth, Syncfusion.Windows.Forms.Tools.BorderPosition.North)

Aligning child control to a different position

Aligning button at the North relative to container