officefileapi-devexpress-dot-xtrarichedit-dot-api-dot-layout-dot-documentlayout-dot-getpage-x28-system-dot-int32-x29.md
Gets the page of the document layout by the specified index.
Namespace : DevExpress.XtraRichEdit.API.Layout
Assembly : DevExpress.RichEdit.v25.2.Core.dll
NuGet Package : DevExpress.RichEdit.Core
public LayoutPage GetPage(
int pageIndex
)
Public Function GetPage(
pageIndex As Integer
) As LayoutPage
| Name | Type | Description |
|---|---|---|
| pageIndex | Int32 |
An integer that is the index of a requested page.
|
| Type | Description |
|---|---|
| LayoutPage |
A LayoutPage object that is the page of the document layout.
|
If the document layout is ready and up-to-date, the GetPage method returns the page with the specified index. Otherwise, the document layout is calculated from the beginning, creating pages until a page with the specified index is ready. The DocumentLayout.PageFormatted and DocumentLayout.DocumentFormatted events may occur in this situation.
The following code snippets (auto-collected from DevExpress Examples) contain references to the GetPage(Int32) method.
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.
winforms-richedit-emulate-the-ms-word-status-bar/CS/WindowsFormsApplication1/Form1.cs#L41
visitor.Reset();
visitor.Visit(richEditControl1.DocumentLayout.GetPage(list[i].PageIndex));
}
int currentPageIndex = currentDocumentLayout.GetPageIndex(layoutPosition);
returnedInformation += PageLayoutHelper.GetInformationAboutCurrentPage(currentDocumentLayout, currentDocumentLayout.GetPage(currentPageIndex), docPosition);
}
winforms-richedit-layout-api/CS/Form1.cs#L29
MyDocumentLayoutVisitor visitor = new MyDocumentLayoutVisitor();
visitor.Visit(richEditControl1.DocumentLayout.GetPage(i));
}
winforms-richedit-enable-line-numbering-and-count-document-rows/CS/LineNumberingExample/Form1.cs#L79
for (int i = 0; i < pageCount; i++) {
visitor.Visit(richEditControl1.DocumentLayout.GetPage(i));
}
word-document-api-examples/CS/CodeExamples/BasicActions.cs#L53
// Access the document page.
DevExpress.XtraRichEdit.API.Layout.LayoutPage layoutPage = wordProcessor.DocumentLayout.GetPage(i);
winforms-richedit-emulate-the-ms-word-status-bar/VB/WindowsFormsApplication1/Form1.vb#L34
visitor.Reset()
visitor.Visit(richEditControl1.DocumentLayout.GetPage(list(i).PageIndex))
Next i
Dim currentPageIndex As Integer = currentDocumentLayout.GetPageIndex(layoutPosition)
returnedInformation &= PageLayoutHelper.GetInformationAboutCurrentPage(currentDocumentLayout, currentDocumentLayout.GetPage(currentPageIndex), docPosition)
End If
richedit-winforms-layout-element-under-cursor/VB/ToolTip/Form1.vb#L26
Dim pageIndex As Integer = pageLayoutPosition.PageIndex
Dim layoutPage As LayoutPage = richEditControl1.DocumentLayout.GetPage(pageIndex)
'Create a HitTestManager instance:
winforms-richedit-layout-api/VB/Form1.vb#L24
Dim visitor As New MyDocumentLayoutVisitor()
visitor.Visit(richEditControl1.DocumentLayout.GetPage(i))
Next i
winforms-richedit-enable-line-numbering-and-count-document-rows/VB/LineNumberingExample/Form1.vb#L74
For i As Integer = 0 To pageCount - 1
visitor.Visit(richEditControl1.DocumentLayout.GetPage(i))
Next
See Also