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

Shape.ZOrder Property

Gets or sets the position of the shape in the z-order.

Namespace: DevExpress.XtraRichEdit.API.Native

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

Declaration

int ZOrder { get; set; }

Property Value

Type Description
Int32

An integer that represents a shape position in the z-order.

Remarks

When a new shape is inserted in a document, it gets a ZOrder value calculated as the maximum ZOrder value of all shapes in the document plus 1024 (0x400). When a command that changes a floating object z-order is executed, it modifies ZOrder value of the selected shape.

Consider the FloatingObjectSendToBackCommand command. It sets the ZOrder of the selected shape to a value one less than the minimum ZOrder value of all shapes in the document.

The code snippet below uses the Shape.ZOrder property to position an image behind the specified drawing object and sets the Shape.TextWrapping property to place the image behind the text.

XtraRichEdit_Shapes_PlaceBehindText

document.LoadDocument("FirstLook.docx", DevExpress.XtraRichEdit.DocumentFormat.OpenXml);
Shape myPicture = document.Shapes[1];
myPicture.VerticalAlignment = ShapeVerticalAlignment.Top;
myPicture.ZOrder = document.Shapes[0].ZOrder - 1;
myPicture.TextWrapping = TextWrappingType.BehindText;

The following code snippets (auto-collected from DevExpress Examples) contain references to the ZOrder 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