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

Shape.TextWrapping Property

Gets or sets how the shape is surrounded by the text.

Namespace: DevExpress.XtraRichEdit.API.Native

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

Declaration

TextWrappingType TextWrapping { get; set; }

Property Value

Type Description
TextWrappingType

A TextWrappingType enumeration member.

Remarks

Use the TextWrapping property to specify whether the text wraps around, over or behind the shape.

The TextWrapping property for shapes located in header/footer can be set only to TextWrappingType.BehindText or TextWrappingType.InFrontOfText.

Polygonal wrapping modes (Through and Tight) are interpreted as Square when rendering the document. These modes are available for compatibility reasons so that they are not lost when the document is resaved.

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.

Document document = server.Document;
document.LoadDocument("Documents\\Grimm.docx", 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 TextWrapping 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