Class LineStyle
Encapsulates the line properties of an object.
Implements
Inherited Members
Namespace: Syncfusion.Windows.Forms.Diagram
Assembly: Syncfusion.Diagram.Base.dll
Syntax
public class LineStyle : PropertyContainer, IServiceReferenceHolder, IServiceReferenceProvider, IPropertyObserver, IPropertyContainer, ICloneable, ISerializable, IDisposable
Remarks
This style is used to create pens for drawing lines. The creates a pen from the properties contained in the line style object.
Constructors
LineStyle()
Initializes a new instance of the LineStyle class.
Declaration
public LineStyle()
LineStyle(LineStyle)
Initializes a new instance of the LineStyle class.
Declaration
public LineStyle(LineStyle src)
Parameters
Type | Name | Description |
---|---|---|
LineStyle | src | The line style.. |
LineStyle(SerializationInfo, StreamingContext)
Initializes a new instance of the LineStyle class.
Declaration
protected LineStyle(SerializationInfo info, StreamingContext context)
Parameters
Type | Name | Description |
---|---|---|
System.Runtime.Serialization.SerializationInfo | info | The info. |
System.Runtime.Serialization.StreamingContext | context | The context. |
Properties
DashCap
Gets or sets type of cap to use for dashed lines.
Declaration
public DashCap DashCap { get; set; }
Property Value
Type |
---|
System.Drawing.Drawing2D.DashCap |
DashOffset
Gets or sets Offset of dashes in dashed lines in logical units.
Declaration
public float DashOffset { get; set; }
Property Value
Type |
---|
System.Single |
DashPattern
Gets or sets an array of custom dashes and spaces.
Declaration
public float[] DashPattern { get; set; }
Property Value
Type |
---|
System.Single[] |
DashStyle
Gets or sets style to use for dashed lines.
Declaration
public DashStyle DashStyle { get; set; }
Property Value
Type |
---|
System.Drawing.Drawing2D.DashStyle |
EndCap
Gets or sets type of end cap used to draw lines.
Declaration
public LineCap EndCap { get; set; }
Property Value
Type |
---|
System.Drawing.Drawing2D.LineCap |
LineColor
Gets or sets Color used to draw lines.
Declaration
public Color LineColor { get; set; }
Property Value
Type |
---|
System.Drawing.Color |
LineJoin
Gets or sets how lines are joined at corners.
Declaration
public LineJoin LineJoin { get; set; }
Property Value
Type |
---|
System.Drawing.Drawing2D.LineJoin |
LineWidth
Gets or sets Width of the pen in logical units.
Declaration
public float LineWidth { get; set; }
Property Value
Type |
---|
System.Single |
MiterLimit
Gets or sets Miter limit value.
Declaration
public float MiterLimit { get; set; }
Property Value
Type |
---|
System.Single |
Methods
Clone()
Creates a new object that is a copy of the current instance.
Declaration
public override object Clone()
Returns
Type | Description |
---|---|
System.Object | A new object that is a copy of this instance. |
Overrides
CreatePen()
Creates a Pen object using the properties contained by the line style.
Declaration
public Pen CreatePen()
Returns
Type | Description |
---|---|
System.Drawing.Pen | System.Drawing.Pen object. |
CreatePen(Single)
Creates a Pen object using the properties contained by the line style.
Declaration
public Pen CreatePen(float padding)
Parameters
Type | Name | Description |
---|---|---|
System.Single | padding | Padding to add to width of the pen |
Returns
Type | Description |
---|---|
System.Drawing.Pen | System.Drawing.Pen object. |
GetObjectData(SerializationInfo, StreamingContext)
Populates a System.Runtime.Serialization.SerializationInfo with the data needed to serialize the target object.
Declaration
protected override void GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
Type | Name | Description |
---|---|---|
System.Runtime.Serialization.SerializationInfo | info | The System.Runtime.Serialization.SerializationInfo to populate with data. |
System.Runtime.Serialization.StreamingContext | context | The destination (see System.Runtime.Serialization.StreamingContext) for this serialization. |
Overrides
Exceptions
Type | Condition |
---|---|
System.Security.SecurityException | The caller does not have the required permission. |
GetPropertyContainerName()
Gets the name of the property container.
Declaration
protected override string GetPropertyContainerName()
Returns
Type | Description |
---|---|
System.String | Property container name. |
Overrides
OnMeasureUnitsChanging(MeasureUnits, MeasureUnits)
Called when measure units changing.
Declaration
protected override void OnMeasureUnitsChanging(MeasureUnits from, MeasureUnits to)
Parameters
Type | Name | Description |
---|---|---|
MeasureUnits | from | The old value. |
MeasureUnits | to | The new value. |