WinForms

Code Examples Upgrade Guide User Guide Demos Support Forums Download
  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class LineStyle

    Show / Hide Table of Contents

    Class LineStyle

    Encapsulates the line properties of an object.

    Inheritance
    System.Object
    PropertyContainer
    LineStyle
    Implements
    IServiceReferenceHolder
    IServiceReferenceProvider
    IPropertyObserver
    IPropertyContainer
    System.ICloneable
    System.Runtime.Serialization.ISerializable
    System.IDisposable
    Inherited Members
    PropertyContainer.m_propertyObserver
    PropertyContainer.UpdateServiceReferences(IServiceReferenceProvider)
    PropertyContainer.Dispose()
    PropertyContainer.ProvideServiceReference(RuntimeTypeHandle)
    PropertyContainer.RecordPropertyChanged(String)
    PropertyContainer.OnPropertyChanging(String, Object)
    PropertyContainer.OnPropertyChanged(String)
    PropertyContainer.GetPropertyContainerByName(String)
    PropertyContainer.ISerializable.GetObjectData(SerializationInfo, StreamingContext)
    PropertyContainer.IPropertyObserver.OnPropertyChanging(String, String, Object)
    PropertyContainer.IPropertyObserver.OnPropertyChanged(String, String)
    PropertyContainer.PropertyObserber
    PropertyContainer.MeasureUnit
    PropertyContainer.InheritContainerMeasureUnits
    PropertyContainer.HistoryService
    PropertyContainer.FullContainerName
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    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 Description
    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 Description
    System.Single

    DashPattern

    Gets or sets an array of custom dashes and spaces.

    Declaration
    public float[] DashPattern { get; set; }
    Property Value
    Type Description
    System.Single[]

    DashStyle

    Gets or sets style to use for dashed lines.

    Declaration
    public DashStyle DashStyle { get; set; }
    Property Value
    Type Description
    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 Description
    System.Drawing.Drawing2D.LineCap

    LineColor

    Gets or sets Color used to draw lines.

    Declaration
    public Color LineColor { get; set; }
    Property Value
    Type Description
    System.Drawing.Color

    LineJoin

    Gets or sets how lines are joined at corners.

    Declaration
    public LineJoin LineJoin { get; set; }
    Property Value
    Type Description
    System.Drawing.Drawing2D.LineJoin

    LineWidth

    Gets or sets Width of the pen in logical units.

    Declaration
    public float LineWidth { get; set; }
    Property Value
    Type Description
    System.Single

    MiterLimit

    Gets or sets Miter limit value.

    Declaration
    public float MiterLimit { get; set; }
    Property Value
    Type Description
    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
    PropertyContainer.Clone()

    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
    PropertyContainer.GetObjectData(SerializationInfo, StreamingContext)
    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
    PropertyContainer.GetPropertyContainerName()

    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.

    Overrides
    PropertyContainer.OnMeasureUnitsChanging(MeasureUnits, MeasureUnits)

    Implements

    IServiceReferenceHolder
    IServiceReferenceProvider
    IPropertyObserver
    IPropertyContainer
    System.ICloneable
    System.Runtime.Serialization.ISerializable
    System.IDisposable
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved