[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.Drawing.IShape.ZOrder

ZOrder Method

ZOrder(ZOrderType)

Moves the specified shape in front of or behind other shapes in the collection.

Use ZOrderPosition to determine the current z-order position of a shape. If the z-order of a shape is changed, the index of the shape in the worksheet's shapes collection also changes.

Declaration
void ZOrder(ZOrderType zOrderType)
Sub ZOrder(zOrderType As ZOrderType)
Parameters
Type Name Description
ZOrderType zOrderType

The z-order command that specifies where to move the shape relative to the other shapes. This value is required.

Examples
IShape rectangle = worksheet.Shapes.AddShape(AutoShapeType.Rectangle, 20, 20, 120, 60);
IShape oval = worksheet.Shapes.AddShape(AutoShapeType.Oval, 40, 30, 120, 60);
rectangle.ZOrder(ZOrderType.BringForward);