Back to Devexpress

DocumentLayout.PageFormatted Event

officefileapi-devexpress-dot-xtrarichedit-dot-api-dot-layout-dot-documentlayout-c20a43c7.md

latest2.1 KB
Original Source

DocumentLayout.PageFormatted Event

Fires after a page layout is recalculated.

Namespace : DevExpress.XtraRichEdit.API.Layout

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

NuGet Package : DevExpress.RichEdit.Core

Declaration

csharp
public event PageFormattedEventHandler PageFormatted
vb
Public Event PageFormatted As PageFormattedEventHandler

Event Data

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

PropertyDescription
PageIndexGets 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

DocumentLayout Class

DocumentLayout Members

DevExpress.XtraRichEdit.API.Layout Namespace