Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

Document.Sections Property

Provides access to a collection of sections.

Namespace: DevExpress.XtraRichEdit.API.Native

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

NuGet Package: DevExpress.RichEdit.Core

#Declaration

SectionCollection Sections { get; }

#Property Value

Type Description
SectionCollection

A SectionCollection interface defining a list of sections.

#Example

The following code sample specifies page layout settings for the first section of the document: the A6 paper in landscape orientation with the left margin set to two inches.

View Example

using DevExpress.XtraRichEdit;
using DevExpress.XtraRichEdit.API.Native;
using DevExpress.Drawing.Printing;
using DevExpress.Utils;

using (var wordProcessor = new RichEditDocumentServer()) {

    wordProcessor.LoadDocument("Documents\\Grimm.docx");
    Document document = wordProcessor.Document;

    document.Sections[0].Page.PaperKind = DXPaperKind.A6;
    document.Sections[0].Page.Landscape = true;
    document.Sections[0].Margins.Left = Units.InchesToDocumentsF(2.0f);
}

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