.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

RichEditView.GetVisiblePageLayoutInfos() Method

Obtains information on the layout of visible pages.

Namespace: DevExpress.XtraRichEdit

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

Declaration

public List<PageLayoutInfo> GetVisiblePageLayoutInfos()
Public Function GetVisiblePageLayoutInfos As List(Of PageLayoutInfo)

Returns

Type Description
List<PageLayoutInfo>

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

Examples

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)
See Also