Skip to main content
A newer version of this page is available. .
.NET Framework 4.5.2+
Row

Shape.ZOrderPosition Property

Gets the position of the current drawing object in the z-order.

Namespace: DevExpress.Spreadsheet

Assembly: DevExpress.Spreadsheet.v19.1.Core.dll

Declaration

int ZOrderPosition { get; set; }

Property Value

Type Description
Int32

An integer that indicates the position in the z-order.

Remarks

When drawing objects are added to the Worksheet.Shapes collection, the ZOrderPosition value is incremented by one starting from 1. You can increase the ZOrderPosition property value to move the drawing object in front of all objects with a lower ZOrderPosition. The ShapeCollection.NormalizeZOrder method modifies ZOrderPosition values for all drawing objects in a collection so that they become a series of consecutive integers starting from 1.

Example

workbook.BeginUpdate()
Try
    Dim worksheet As Worksheet = workbook.Worksheets(0)
    ' Insert pictures.
    Dim pic1 As Picture = worksheet.Pictures.AddPicture("Pictures\x-docserver.png", worksheet.Cells("B2"))
    Dim pic2 As Picture = worksheet.Pictures.AddPicture("Pictures\x-spreadsheet.png", worksheet.Cells("C5"))
    ' Bring the first picture to front.
    pic1.ZOrderPosition = 3
Finally
    workbook.EndUpdate()
End Try

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ZOrderPosition property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also