officefileapi-devexpress-dot-xtrarichedit-dot-api-dot-layout-dot-layoutpage.md
Obtains a range that corresponds to the main page area of the current page.
Namespace : DevExpress.XtraRichEdit.API.Layout
Assembly : DevExpress.RichEdit.v25.2.Core.dll
NuGet Package : DevExpress.RichEdit.Core
public FixedRange MainContentRange { get; }
Public ReadOnly Property MainContentRange As FixedRange
| Type | Description |
|---|---|
| FixedRange |
A FixedRange value that is the range of the main page area.
|
The MainContentRange property value equals the RangedLayoutElementBase.Range property value of the LayoutPageArea element which relates to the main document area of the current page.
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the MainContentRange 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.
office-file-api-ai-implementation/CS/Controllers/ProofreadController.cs#L36
case RichEditDocumentPart.FirstPage:
var fixedRange = wordProcessor.DocumentLayout.GetPage(0).MainContentRange;
var pageRange = wordProcessor.Document.CreateRange(fixedRange.Start, fixedRange.Length); // Translate the first page
See Also