DynamicDocumentPaginator Class
Provides an abstract base class that supports automatic background pagination and tracking content positions across repaginations in addition to the methods and properties of its own base class.
System.Windows.Documents::DocumentPaginator
System.Windows.Documents::DynamicDocumentPaginator
Assembly: PresentationCore (in PresentationCore.dll)
The DynamicDocumentPaginator type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | DynamicDocumentPaginator | Initializes a new instance of the DynamicDocumentPaginator class. |
| Name | Description | |
|---|---|---|
![]() | IsBackgroundPaginationEnabled | Gets or sets a value indicating whether pagination is performed automatically in the background in response to certain events, such as a change in page size. |
![]() | IsPageCountValid | When overridden in a derived class, gets a value indicating whether PageCount is the total number of pages. (Inherited from DocumentPaginator.) |
![]() | PageCount | When overridden in a derived class, gets a count of the number of pages currently formatted (Inherited from DocumentPaginator.) |
![]() | PageSize | When overridden in a derived class, gets or sets the suggested width and height of each page. (Inherited from DocumentPaginator.) |
![]() | Source | When overridden in a derived class, returns the element being paginated. (Inherited from DocumentPaginator.) |
| Name | Description | |
|---|---|---|
![]() | CancelAsync | Cancels a previous GetPageAsync or DynamicDocumentPaginator::GetPageNumberAsync operation. (Inherited from DocumentPaginator.) |
![]() | ComputePageCount | Forces a pagination of the content, updates PageCount with the new total, and sets IsPageCountValid to true. (Inherited from DocumentPaginator.) |
![]() | ComputePageCountAsync() | Asynchronously, forces a pagination of the content, updates PageCount with the new total, and sets IsPageCountValid to true. (Inherited from DocumentPaginator.) |
![]() | ComputePageCountAsync(Object) | Asynchronously, forces a pagination of the content, updates PageCount with the new total, sets IsPageCountValid to true. (Inherited from DocumentPaginator.) |
![]() | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetObjectPosition | When overridden in a derived class, returns a ContentPosition for the specified Object. |
![]() | GetPage | When overridden in a derived class, gets the DocumentPage for the specified page number. (Inherited from DocumentPaginator.) |
![]() | GetPageAsync(Int32) | Asynchronously returns (through the GetPageCompleted event) the DocumentPage for the specified page number. (Inherited from DocumentPaginator.) |
![]() | GetPageAsync(Int32, Object) | Asynchronously returns (through the GetPageCompleted event) the DocumentPage for the specified page number and assigns the specified ID to the asynchronous task. (Inherited from DocumentPaginator.) |
![]() | GetPageNumber | When overridden in a derived class, returns the zero-based page number of the specified ContentPosition. |
![]() | GetPageNumberAsync(ContentPosition) | Asynchronously, returns (through the This method raises the GetPageNumberCompleted event) the zero-based page number of the specified ContentPosition. |
![]() | GetPageNumberAsync(ContentPosition, Object) | Asynchronously, returns (through the This method raises the GetPageNumberCompleted event) the zero-based page number of the specified ContentPosition. |
![]() | GetPagePosition | When overridden in a derived class, gets the position of the specified page in the document's content. |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | OnComputePageCountCompleted | Raises the ComputePageCountCompleted event. (Inherited from DocumentPaginator.) |
![]() | OnGetPageCompleted | Raises the GetPageCompleted event. (Inherited from DocumentPaginator.) |
![]() | OnGetPageNumberCompleted | Raises the GetPageNumberCompleted event. |
![]() | OnPagesChanged | Raises the PagesChanged event. (Inherited from DocumentPaginator.) |
![]() | OnPaginationCompleted | Raises the PaginationCompleted event. |
![]() | OnPaginationProgress | Raises the PaginationProgress event. |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
| Name | Description | |
|---|---|---|
![]() | ComputePageCountCompleted | Occurs when a ComputePageCountAsync operation has finished. (Inherited from DocumentPaginator.) |
![]() | GetPageCompleted | Occurs when GetPageAsync has completed. (Inherited from DocumentPaginator.) |
![]() | GetPageNumberCompleted | Occurs when GetPageNumberAsync has completed. |
![]() | PagesChanged | Occurs when the document content is changed. (Inherited from DocumentPaginator.) |
![]() | PaginationCompleted | Occurs when all document content has been paginated. |
![]() | PaginationProgress | Occurs when one or more content pages have been paginated. |
By default, a DynamicDocumentPaginator will automatically pre-paginate content in the background (this process begins when IsBackgroundPaginationEnabled is true, which is the default setting).
When IsBackgroundPaginationEnabled is true, the layout will also be repaginated due to changes in content or changes in PageSize.
The PaginationProgress event occurs upon completion of pagination (or repagination) of one or more pages, such as in the following situations:
PaginationProgress events occur as content is paginated in the background. Depending on the implementation, the event may occur upon paginating one or multiple pages (PaginationProgressEventArgs specifies which pages have been paginated).
Calls to GetPage or GetPageAsync may cause an PaginationProgress event to occur if the page specified has not been paginated. For example, if background pagination is enabled (IsBackgroundPaginationEnabled = true) but pagination has only been completed up to the third page, a call of GetPage with an argument of 6 will cause pages four, five, six, and seven to be paginated. Upon completion, a PaginationProgress event will be raised with PaginationProgressEventArgs settings of Start = 4 and Count = 4.
With background pagination enabled (IsBackgroundPaginationEnabled = true), a change in PageSize on flow-format content, such as a FlowDocument, may cause repagination and associated PaginationProgress events. Note that PageSize has no effect in repagination on fixed-format content, such as FixedDocument, where the visual page size does not affect the layout.
A PaginationCompleted event also occurs when background pagination is disabled. For example, if there is only one page of content and IsBackgroundPaginationEnabled = false), calling GetPage with an argument of 0 will result in two events:
A PaginationProgress event with PaginationProgressEventArgs settings of Start = 0 and Count = 1.
A PaginationCompleted event.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
