LinePrimitive
Represents a primitive element that renders lines and separators with configurable orientation and styling.
LinePrimitive extends FillPrimitive to provide line drawing capabilities including horizontal and vertical separators, diagonal lines, and custom angle lines. It supports various line widths, colors, and gradient effects.
The primitive is commonly used for drawing separators in menus, toolbars, and panels, as well as decorative lines in UI layouts. It automatically handles DPI scaling to ensure consistent appearance across different display resolutions.
LinePrimitive can render both simple solid lines and complex gradient-filled lines using the inherited fill capabilities from its base class.
Definition
Namespace:Telerik.WinControls.Primitives
Assembly:Telerik.WinControls.dll
Syntax:
public class LinePrimitive : FillPrimitive, IDisposable, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IStylableNode, IPrimitive, IFillElement, IPrimitiveElement, IShapedElement
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementBasePrimitiveFillPrimitiveLinePrimitive...
Implements:
Inherited Members
Constructors
public LinePrimitive()
Fields
Identifies the property that controls the thickness of the rendered line.
public static RadProperty LineWidthProperty
Identifies the property that selects horizontal or vertical line rendering.
public static RadProperty OrientationProperty
Identifies the sweep-angle property, which painting sets to 0 degrees for horizontal lines and 90 degrees for vertical lines.
public static RadProperty SweepAngleProperty
Properties
Gets or sets the line orientation. Possible values are defined in the SepOrientation enumeration.
public virtual SepOrientation SeparatorOrientation { get; set; }
Gets or sets the line angle in degrees.
public virtual int SweepAngle { get; set; }
Methods
Initializes the line to fit the available width or height within its parent's padding.
protected override void InitializeFields()
Overrides:
Measures the line as one pixel thick along its orientation and zero-sized on the other axis.