menu

WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class Shape - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class Shape

    Represents base shape.

    Inheritance
    System.Object
    EntityBase
    XDLSSerializableBase
    WidgetBase
    Shape
    ArcShape
    BezierShape
    EllipseShape
    ImageShape
    LineShape
    PathShape
    PieShape
    PolygonShape
    RectangleShape
    TextShape
    Implements
    IEntityBase
    IXDLSSerializable
    IShape
    ILeafWidget
    IWidget
    Inherited Members
    EntityBase.Document
    EntityBase.DocumentEx
    EntityBase.Owner
    EntityBase.SetOwner(IEntityBase)
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    WidgetBase.DrawImpl(CustomGraphics, LayoutedWidget)
    WidgetBase.IWidget.Draw(CustomGraphics, LayoutedWidget)
    WidgetBase.IWidget.LayoutInfo
    WidgetBase.m_layoutInfo
    XDLSSerializableBase.IXDLSSerializable.ReadXmlAttributes(IXDLSAttributeReader)
    XDLSSerializableBase.IXDLSSerializable.ReadXmlContent(IXDLSContentReader)
    XDLSSerializableBase.IXDLSSerializable.RestoreReference(String, Int32)
    XDLSSerializableBase.IXDLSSerializable.WriteXmlAttributes(IXDLSAttributeWriter)
    XDLSSerializableBase.IXDLSSerializable.WriteXmlContent(IXDLSContentWriter)
    XDLSSerializableBase.IXDLSSerializable.XDLSHolder
    XDLSSerializableBase.m_id
    XDLSSerializableBase.ReadXmlAttributes(IXDLSAttributeReader)
    XDLSSerializableBase.RestoreReference(String, Int32)
    XDLSSerializableBase.WriteXmlAttributes(IXDLSAttributeWriter)
    XDLSSerializableBase.XDLSHolder
    Namespace: Syncfusion.DLS
    Assembly: Syncfusion.DLS.Base.dll
    Syntax
    public class Shape : WidgetBase, IEntityBase, IXDLSSerializable, IShape, ILeafWidget, IWidget
    Remarks

    Supported by Essential PDF only.

    Constructors

    Shape(Canvas)

    Initializing constructor

    Declaration
    public Shape(Canvas canvas)
    Parameters
    Type Name Description
    Canvas canvas

    Fields

    m_canvas

    Declaration
    protected Canvas m_canvas
    Field Value
    Type
    Canvas

    Properties

    ShapeFormat

    Gets / sets format of the shape.

    Declaration
    public ShapeFormat ShapeFormat { get; }
    Property Value
    Type
    ShapeFormat

    StyleName

    Gets name of style attached to the range.

    Declaration
    public string StyleName { get; }
    Property Value
    Type
    System.String

    Transform

    Gets / sets the world transformation for this shape object.

    Declaration
    public Matrix Transform { get; }
    Property Value
    Type
    System.Drawing.Drawing2D.Matrix

    Methods

    ApplyStyle(String)

    Attaches style to the range.

    Declaration
    public void ApplyStyle(string styleName)
    Parameters
    Type Name Description
    System.String styleName

    Style to be attached to the range.

    ApplyTransform(CustomGraphics)

    Helper Method to Apply Transform on the custom graphics

    Declaration
    protected void ApplyTransform(CustomGraphics cg)
    Parameters
    Type Name Description
    CustomGraphics cg

    CreateLayoutInfo()

    Declaration
    protected override void CreateLayoutInfo()
    Overrides
    WidgetBase.CreateLayoutInfo()

    InitXDLSHolder()

    Declaration
    protected override void InitXDLSHolder()
    Overrides
    XDLSSerializableBase.InitXDLSHolder()

    Measure(CustomGraphics)

    Gets the size of the Custom Graphics

    Declaration
    public SizeF Measure(CustomGraphics graphics)
    Parameters
    Type Name Description
    CustomGraphics graphics
    Returns
    Type
    System.Drawing.SizeF

    ReadXmlContent(IXDLSContentReader)

    Overloaded. Reads inner content.

    Declaration
    protected override bool ReadXmlContent(IXDLSContentReader reader)
    Parameters
    Type Name Description
    IXDLSContentReader reader

    Reader object.

    Returns
    Type
    System.Boolean
    Overrides
    XDLSSerializableBase.ReadXmlContent(IXDLSContentReader)

    ResetTransform(CustomGraphics)

    Helper Method to reset Transform on the custom graphics

    Declaration
    protected void ResetTransform(CustomGraphics cg)
    Parameters
    Type Name Description
    CustomGraphics cg

    WriteXmlContent(IXDLSContentWriter)

    Overloaded. Writes data to XML.

    Declaration
    protected override void WriteXmlContent(IXDLSContentWriter writer)
    Parameters
    Type Name Description
    IXDLSContentWriter writer

    Writer object.

    Overrides
    XDLSSerializableBase.WriteXmlContent(IXDLSContentWriter)

    Implements

    IEntityBase
    IXDLSSerializable
    IShape
    ILeafWidget
    IWidget
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved