RichEditControl.VisiblePagesChanged Event

Fires when RichEditControl starts or finishes displaying a document page.

Namespace: DevExpress.XtraRichEdit

Assembly: DevExpress.XtraRichEdit.v20.1.dll

Declaration

public event EventHandler VisiblePagesChanged
Public Event VisiblePagesChanged As EventHandler

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