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

Document.Sections Property

Provides access to a collection of sections.

Namespace: DevExpress.XtraRichEdit.API.Native

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


SectionCollection Sections { get; }

Property Value

Type Description

A SectionCollection interface defining a list of sections.


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

server.LoadDocument("Documents\\Grimm.docx", DocumentFormat.OpenXml);
Document document = server.Document;
document.Unit = DevExpress.Office.DocumentUnit.Inch;
document.Sections[0].Page.PaperKind = System.Drawing.Printing.PaperKind.A6;
document.Sections[0].Page.Landscape = true;
document.Sections[0].Margins.Left = 2.0f;
See Also