Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

RichEditControl.VisiblePagesChanged Event

Fires when RichEditControl starts or finishes displaying a document page.

Namespace: DevExpress.XtraRichEdit

Assembly: DevExpress.XtraRichEdit.v24.2.dll

NuGet Package: DevExpress.Win.RichEdit

#Declaration

public event EventHandler VisiblePagesChanged

#Event Data

The VisiblePagesChanged event's data class is EventArgs.

#Remarks

The VisiblePagesChanged event occurs when a user scrolls or zooms the editing surface and changes visible pages.

The code sample below moves the caret position to the visible page’s start, so the vertical ruler is always visible:

void richEditControl_VisiblePagesChanged(object sender, EventArgs e)
{
  RichEditControl control = sender as RichEditControl;
  DocumentRange range = control.ActiveView.GetVisiblePagesRange();
  control.Document.CaretPosition = range.Start;
}
See Also