Border Settings in Windows Forms GradientPanelExt

28 Apr 20211 minute to read

Corner Radius

The GradientPanelExt comes as a rounded rectangle by default. The rounded corners can be removed or their radius can be modified using the CornerRadius property.

Property Table

GradientPanelExt Property Description
CornerRadius Used to set or get the radius truncation for the control's corners.
gradientPanelExt1.CornerRadius = 14;
Private gradientPanelExt1.CornerRadius = 14

Overview_img388

The CornerRadius can be turned off by giving a value of zero for it.

gradientPanelExt1.CornerRadius = 0;
Private gradientPanelExt1.CornerRadius = 0

Overview_img389

Border Gap

The GradientPanelExt comes with a margin for all the four sides. The spacing between the margin and the control’s border can be set using the BorderGap property.

Property Table

GradientPanelExt Property Description
BorderGap Used to get or set the gap between the border and the margins.

The border gap for the GradientPanelExt can be set programmatically as given below.

gradientPanelExt1.BorderGap = 40;
Private gradientPanelExt1.BorderGap = 40

Overview_img390