WinForms Separator Overview

Updated over 6 months ago

RadSeparator is a control that gives you the ability to divide your forms into logical parts. By default it contains of two lines.

ninja-iconThe Separator component is part of Telerik UI for WinForms, a professional grade UI library with 160+ native components for building modern and feature-rich applications. To try it out sign up for a free 30-day trial.Start Free Trial

Figure 1: RadSeparator

WinForms RadTemplates Overview

The control have several properties that you might find interesting:

  • Orientation - gets or sets the control orientation to Vertical or Horizontal

    WinForms RadSeparator Orientation

  • ShadowOffset - gets or sets the offset of the both lines, both horizontal and vertical

  • ShowShadow - enables/disables the second line

  • SeparatorElement - the element that holds the lines. Gives you the ability to access and customize them

Follows a small sample, which demonstrates how to take advantage of the functionalities of RadSeparator

Customize RadSeparator

C#
radSeparator1.ShadowOffset = new Point(10, 0);
radSeparator1.SeparatorElement.Line1.LineWidth = 5;
radSeparator1.SeparatorElement.Line2.LineWidth = 5;
radSeparator1.ShowShadow = true;
radSeparator1.Orientation = Orientation.Horizontal;
radSeparator1.SeparatorElement.Line1.BackColor = Color.Yellow;
radSeparator1.SeparatorElement.Line1.BackColor2 = Color.Orange;
radSeparator1.SeparatorElement.Line1.BackColor3 = Color.Red;
radSeparator1.SeparatorElement.Line1.NumberOfColors = 3;
radSeparator1.SeparatorElement.Line1.GradientStyle = Telerik.WinControls.GradientStyles.Linear;
radSeparator1.SeparatorElement.Line1.GradientAngle = 0;
radSeparator1.SeparatorElement.Line2.BackColor = Color.Black;
radSeparator1.SeparatorElement.Line2.BackColor2 = Color.Green;
radSeparator1.SeparatorElement.Line2.BackColor3 = Color.LightGreen;
radSeparator1.SeparatorElement.Line2.NumberOfColors = 3;
radSeparator1.SeparatorElement.Line2.GradientStyle = Telerik.WinControls.GradientStyles.Linear;
radSeparator1.SeparatorElement.Line2.GradientAngle = 0;

Here is the result of the following code:

Figure 2: RadSeparator Customization

WinForms RadSeparator Customization

Telerik UI for WinForms Learning Resources

See Also