[]
        
(Showing Draft Content)

GrapeCity.Documents.Word.CanvasShape.AddShape

AddShape Method

AddShape()

Adds a new Rectangle 100 x 100 points Shape to the end of the canvas shape.

Declaration
public Shape AddShape()
Public Function AddShape() As Shape
Returns
Type Description
Shape

The added Shape.

AddShape(float, float, string)

Adds a new Rectangle Shape with a specified size and text to the end of the canvas shape.

Declaration
public Shape AddShape(float width, float height, string text = null)
Public Function AddShape(width As Single, height As Single, Optional text As String = Nothing) As Shape
Parameters
Type Name Description
float width

The shape width, in points.

float height

The shape height, in points.

string text

If not null, a TextFrame with this text is added to the shape.

Returns
Type Description
Shape

The added Shape.

AddShape(float, float, string, GeometryType)

Adds a new Shape with a specified size, text and geometry to the end of the canvas shape.

Declaration
public Shape AddShape(float width, float height, string text, GeometryType type)
Public Function AddShape(width As Single, height As Single, text As String, type As GeometryType) As Shape
Parameters
Type Name Description
float width

The shape width, in points.

float height

The shape height, in points.

string text

If not null, a TextFrame with this text is added to the shape.

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

GeometryType type

The geometry type of the shape.

Returns
Type Description
Shape

The added Shape.

AddShape(float, float, GeometryType)

Adds a new Shape with a specified size and text to the end of the canvas shape.

Declaration
public Shape AddShape(float width, float height, GeometryType type)
Public Function AddShape(width As Single, height As Single, type As GeometryType) As Shape
Parameters
Type Name Description
float width

The shape width, in points.

float height

The shape height, in points.

GeometryType type

The geometry type of the shape.

Returns
Type Description
Shape

The added Shape.