Class LinePrimitive
Represents a primitive element that renders lines and separators with configurable orientation and styling.
Inheritance
Inherited Members
Namespace: Telerik.WinControls.Primitives
Assembly: Telerik.WinControls.dll
Syntax
public class LinePrimitive : FillPrimitive, IDisposable, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IStylableNode, IPrimitive, IFillElement, IPrimitiveElement, IShapedElement
Remarks
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.
Constructors
LinePrimitive()
Declaration
public LinePrimitive()
Fields
LineWidthProperty
OrientationProperty
SweepAngleProperty
Properties
LineWidth
Gets or sets the line width in pixels.
Declaration
public virtual int LineWidth { get; set; }
Property Value
System.Int32
|
SeparatorOrientation
Gets or sets the line orientation. Possible values are defined in the SepOrientation enumeration.
Declaration
public virtual SepOrientation SeparatorOrientation { get; set; }
Property Value
SepOrientation
|
SweepAngle
Gets or sets the line angle in degrees.
Declaration
public virtual int SweepAngle { get; set; }
Property Value
System.Int32
|
Methods
InitializeFields()
MeasureOverride(SizeF)
Declaration
protected override SizeF MeasureOverride(SizeF availableSize)
Parameters
System.Drawing.SizeF
availableSize
|
Returns
System.Drawing.SizeF
|
Overrides
PaintPrimitive(IGraphics, Single, SizeF)
Draws the primitive on the screen.
Declaration
public override void PaintPrimitive(IGraphics g, float angle, SizeF scale)
Parameters
IGraphics
g
|
System.Single
angle
|
System.Drawing.SizeF
scale
|