Skip to main content
A newer version of this page is available.
All docs
V18.2

How to: Change Z-Order and Text Wrapping

The following code snippet uses the Shape.ZOrder property to position an image behind the specified floating object and sets the Shape.TextWrapping property to set the image behind the text of the document.

Note

A complete sample project is available at https://github.com/DevExpress-Examples/wpf-richedit-document-api-t213968.

document.LoadDocument("Documents//Grimm.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;