Document Solutions for Word
GrapeCity.Documents.Word Assembly / GrapeCity.Documents.Word Namespace / Run Class / AddShape Method / AddShape(Single,Single,String,GeometryType) Method
The shape width, in points.
The shape height, in points.
If not null, a TextFrame with this text is added to the shape.

Note that some geometries do not allow text frames (see Extensions.TextFrameSupported). If this parameter is not null and type specifies one of those geometries, an exception will be thrown.

The geometry type of the shape.

In This Topic
    AddShape(Single,Single,String,GeometryType) Method
    In This Topic
    Adds a new Shape with a specified size, text and geometry to the end of the run.
    Syntax
    'Declaration
     
    Public Overloads Function AddShape( _
       ByVal width As System.Single, _
       ByVal height As System.Single, _
       ByVal text As System.String, _
       ByVal type As GeometryType _
    ) As Shape
    public Shape AddShape( 
       System.float width,
       System.float height,
       System.string text,
       GeometryType type
    )

    Parameters

    width
    The shape width, in points.
    height
    The shape height, in points.
    text
    If not null, a TextFrame with this text is added to the shape.

    Note that some geometries do not allow text frames (see Extensions.TextFrameSupported). If this parameter is not null and type specifies one of those geometries, an exception will be thrown.

    type
    The geometry type of the shape.

    Return Value

    The added Shape.
    See Also