Back to Devexpress

LayoutPage.MainContentRange Property

officefileapi-devexpress-dot-xtrarichedit-dot-api-dot-layout-dot-layoutpage.md

latest2.6 KB
Original Source

LayoutPage.MainContentRange Property

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

Declaration

csharp
public FixedRange MainContentRange { get; }
vb
Public ReadOnly Property MainContentRange As FixedRange

Property Value

TypeDescription
FixedRange

A FixedRange value that is the range of the main page area.

|

Remarks

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

csharp
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

LayoutPage Class

LayoutPage Members

DevExpress.XtraRichEdit.API.Layout Namespace