Document.Sections Property
Provides access to a collection of sections.
Namespace: DevExpress.XtraRichEdit.API.Native
Assembly: DevExpress.RichEdit.v23.1.Core.dll
NuGet Package: DevExpress.RichEdit.Core
Declaration
Property Value
Type | Description |
---|---|
SectionCollection | A SectionCollection interface defining a list of sections. |
Example
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 = DevExpress.Drawing.Printing.DXPaperKind.A6;
document.Sections[0].Page.Landscape = true;
document.Sections[0].Margins.Left = 2.0f;
Related GitHub Examples
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.