Skip to main content
Box

DocumentLayout.PageFormatted Event

Fires after a page layout is recalculated.

Namespace: DevExpress.XtraRichEdit.API.Layout

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

NuGet Packages: DevExpress.RichEdit.Core, DevExpress.Win.Navigation

Declaration

public event PageFormattedEventHandler PageFormatted

Event Data

The PageFormatted event's data class is PageFormattedEventArgs. The following properties provide information specific to this event:

Property Description
PageIndex Gets an index of the page that raised the event.

Remarks

The PageFormatted event fires for each page whose layout has been recalculated. Document modifications may change the layout of only certain pages (e.g. typing a text invalidates the layout of the current page and the pages which follow). In this situation, the PageFormatted event fires for affected pages, not for the entire document.

Important

The PageFormatted event handler is running in a background (non-UI) thread. To avoid concurrency issues, execute the code which affects the document or interacts with the user asynchronously in a background thread using the RichEditControl.BeginInvoke method.

Note

The order of layout calculation for pages can be different from their order in the document.

See Also