Skip to main content
A newer version of this page is available. .
.NET Framework 4.5.2+

RichEditView.GetVisiblePageLayoutInfos() Method

Obtains information on the layout of visible pages.

Namespace: DevExpress.XtraRichEdit

Assembly: DevExpress.RichEdit.v20.2.Core.dll

NuGet Package: DevExpress.RichEdit.Core

Declaration

public List<PageLayoutInfo> GetVisiblePageLayoutInfos()

Returns

Type Description
List<PageLayoutInfo>

A List<T><PageLayoutInfo,> list of layout information on individual pages.

Example

This code snippet illustrates the use of the RichEditView.GetVisiblePageLayoutInfos and RichEditView.GetVisiblePagesRange methods to display information about visible pages and indicate page boundaries.

Dim pages As List(Of PageLayoutInfo) = richEditControl1.ActiveView.GetVisiblePageLayoutInfos()
Dim visibleRange As DocumentRange = richEditControl1.ActiveView.GetVisiblePagesRange()

Dim redPen As New Pen(Color.Red, 1)
Dim gr As Graphics = richEditControl1.CreateGraphics()
gr.DrawRectangle(redPen, pages(0).Bounds)

Dim s As String = String.Format("{0} page(s) displayed." & ControlChars.CrLf & "From page {1} which starts at document position {2}." & ControlChars.CrLf & "To page {3} which ends at document position {4}." & ControlChars.CrLf & "First visible page is outlined with red.", pages.Count, pages(0).PageIndex, visibleRange.Start, pages(pages.Count - 1).PageIndex, visibleRange.End)

The following code snippets (auto-collected from DevExpress Examples) contain references to the GetVisiblePageLayoutInfos() 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.

See Also