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
public static RadProperty LineWidthProperty
public static RadProperty OrientationProperty
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 member fields to their default values. This method is called prior the CreateChildItems one and allows for initialization of members on which child elements depend.
protected override void InitializeFields()
Overrides:
Measures the space required by the RadElement
Used by the layout system.
protected override SizeF MeasureOverride(SizeF availableSize)
The size that is available to the RadElement. The available size can be infinity (to take the full size of the element)
Returns:The minimum size required by the element to be completely visible. Cannot be infinity.
Overrides:
In this method call to the Measure method of each child must be made.