.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

Shape.ZOrder Property

Gets or sets the shape's position in the z-order.

Namespace: DevExpress.XtraRichEdit.API.Native

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

Declaration

int ZOrder { get; set; }
Property ZOrder As Integer

Property Value

Type Description
Int32

An integer that specifies the shape's position in the z-order.

Remarks

When you insert a new shape in code, its ZOrder value is equal to 0. Change the ZOrder value to move the shape in front of or behind other shapes in the collection.

The example below uses the Shape.ZOrder property to position a picture behind the specified drawing object and sets the picture's Shape.TextWrapping property to BehindText.

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;
See Also