[]
        
(Showing Draft Content)

GrapeCity.Documents.Word.ShapeCollection.Insert

Insert Method

Insert(InsertLocation)

Inserts a new 100 x 100 points Rectangle Shape into this collection at a specified location.

Declaration
public Shape Insert(InsertLocation location)
Public Function Insert(location As InsertLocation) As Shape
Parameters
Type Name Description
InsertLocation location

The target InsertLocation for the insertion.

Returns
Type Description
Shape

The inserted Shape.

Insert(float, float, InsertLocation)

Inserts a new Rectangle Shape with a specified size into this collection at a specified location.

Declaration
public Shape Insert(float width, float height, InsertLocation location)
Public Function Insert(width As Single, height As Single, location As InsertLocation) As Shape
Parameters
Type Name Description
float width

The shape width, in points.

float height

The shape height, in points.

InsertLocation location

The target InsertLocation for the insertion.

Returns
Type Description
Shape

The inserted Shape.

Insert(float, float, GeometryType, InsertLocation)

Inserts a new Shape with a specified size and geometry into this collection at a specified location.

Declaration
public Shape Insert(float width, float height, GeometryType type, InsertLocation location)
Public Function Insert(width As Single, height As Single, type As GeometryType, location As InsertLocation) 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.

InsertLocation location

The target InsertLocation for the insertion.

Returns
Type Description
Shape

The inserted Shape.

Insert(float, float, string, InsertLocation)

Inserts a new Rectangle Shape with a specified size and text into this collection at a specified location.

Declaration
public Shape Insert(float width, float height, string text, InsertLocation location)
Public Function Insert(width As Single, height As Single, text As String, location As InsertLocation) 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.

InsertLocation location

The target InsertLocation for the insertion.

Returns
Type Description
Shape

The inserted Shape.

Insert(float, float, string, GeometryType, InsertLocation)

Inserts a new Shape with a specified size, text and geometry into this collection at a specified location.

Declaration
public Shape Insert(float width, float height, string text, GeometryType type, InsertLocation location)
Public Function Insert(width As Single, height As Single, text As String, type As GeometryType, location As InsertLocation) 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.

InsertLocation location

The target InsertLocation for the insertion.

Returns
Type Description
Shape

The inserted Shape.