Skip to main content

Table.TextWrappingType Property

Specifies the text wrapping type.

Namespace: DevExpress.XtraRichEdit.API.Native

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

NuGet Packages: DevExpress.RichEdit.Core, DevExpress.Win.Navigation

Declaration

TableTextWrappingType TextWrappingType { get; set; }

Property Value

Type Description
TableTextWrappingType

An enumeration value that indicates which text wrapping is used.

Available values:

Name Description
None

The text is not wrapped around the table.

Around

The text is wrapped around the table.

Remarks

Note

You can specify the TextWrappingType property for tables in the main body, headers or footers only.

Set the TextWrappingType property to TableTextWrappingType.Around to wrap text around the table and use the following properties to specify the table position:

Horizontal position:

Vertical position:

Distance from surrounding text:

The code sample below shows how to wrap text around a table and specify its position:

IMAGE

using DevExpress.XtraRichEdit;
using DevExpress.XtraRichEdit.API.Native;
using DevExpress.Office.Utils;

using (RichEditDocumentServer wordProcessor = new RichEditDocumentServer())
{
  Document document = wordProcessor.Document;
  Table table = document.Tables[0];
  table.BeginUpdate();

  // Wrap text around the table
  table.TextWrappingType = TableTextWrappingType.Around;

  // Specify vertical alignment:
  table.RelativeVerticalPosition = TableRelativeVerticalPosition.Paragraph;
  table.VerticalAlignment = TableVerticalAlignment.None;
  table.OffsetYRelative = Units.InchesToDocumentsF(2f);

  // Specify horizontal alignment:
  table.RelativeHorizontalPosition = TableRelativeHorizontalPosition.Margin;
  table.HorizontalAlignment = TableHorizontalAlignment.Center;

  // Set distance between the text and the table:
  table.MarginBottom = Units.InchesToDocumentsF(0.3f);
  table.MarginLeft = Units.InchesToDocumentsF(0.3f);
  table.MarginTop = Units.InchesToDocumentsF(0.3f);
  table.MarginRight = Units.InchesToDocumentsF(0.3f);
  table.EndUpdate();
}

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