RichEditControl.VisiblePagesChanged Event
In This Article
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