DocumentPaginator 类

定义

提供支持从单个文档创建多页元素的抽象基类。Provides an abstract base class that supports creation of multiple-page elements from a single document.

public ref class DocumentPaginator abstract
public abstract class DocumentPaginator
type DocumentPaginator = class
Public MustInherit Class DocumentPaginator
继承
DocumentPaginator
派生

注解

如果需要自动重新分页来响应事件(例如更改 FlowDocument的页面大小),请使用 DynamicDocumentPaginator 作为基类。If you need automatic background repagination in response to events such as changing the page size of a FlowDocument, then use DynamicDocumentPaginator as your base class.

构造函数

DocumentPaginator()

初始化 DocumentPaginator 类的新实例。Initializes a new instance of the DocumentPaginator class.

属性

IsPageCountValid

当在派生类中重写时,获取一个指示 PageCount 是否为总页数的值。When overridden in a derived class, gets a value indicating whether PageCount is the total number of pages.

PageCount

当在派生类中重写时,获取当前已设置格式的页数的计数。When overridden in a derived class, gets a count of the number of pages currently formatted.

PageSize

在派生类中重写时,获取或设置每一页的建议宽度和高度。When overridden in a derived class, gets or sets the suggested width and height of each page.

Source

在派生类中重写时,返回正在进行分页的元素。When overridden in a derived class, returns the element being paginated.

方法

CancelAsync(Object)

取消前一个 GetPageAsyncGetPageNumberAsync 操作。Cancels a previous GetPageAsync or GetPageNumberAsync operation.

ComputePageCount()

强制对内容进行分页,用新的总页数更新 PageCount,并将 IsPageCountValid 设置为 trueForces a pagination of the content, updates PageCount with the new total, and sets IsPageCountValid to true.

ComputePageCountAsync()

通过异步方式强制对内容进行分页,用新的总页数更新 PageCount,并将 IsPageCountValid 设置为 trueAsynchronously, forces a pagination of the content, updates PageCount with the new total, and sets IsPageCountValid to true.

ComputePageCountAsync(Object)

通过异步方式强制对内容进行分页,用新的总页数更新 PageCount,并将 IsPageCountValid 设置为 trueAsynchronously, forces a pagination of the content, updates PageCount with the new total, sets IsPageCountValid to true.

Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetPage(Int32)

当在派生类中重写时,获取指定页码的 DocumentPageWhen overridden in a derived class, gets the DocumentPage for the specified page number.

GetPageAsync(Int32)

(通过 GetPageCompleted 事件)异步返回指定页码的 DocumentPageAsynchronously returns (through the GetPageCompleted event) the DocumentPage for the specified page number.

GetPageAsync(Int32, Object)

(通过 GetPageCompleted 事件)异步返回指定页码的 DocumentPage,并将指定的 ID 分配给异步任务。Asynchronously returns (through the GetPageCompleted event) the DocumentPage for the specified page number and assigns the specified ID to the asynchronous task.

GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
OnComputePageCountCompleted(AsyncCompletedEventArgs)

引发 ComputePageCountCompleted 事件。Raises the ComputePageCountCompleted event.

OnGetPageCompleted(GetPageCompletedEventArgs)

引发 GetPageCompleted 事件。Raises the GetPageCompleted event.

OnPagesChanged(PagesChangedEventArgs)

引发 PagesChanged 事件。Raises the PagesChanged event.

ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(继承自 Object)

事件

ComputePageCountCompleted

ComputePageCountAsync 操作完成时发生。Occurs when a ComputePageCountAsync operation has finished.

GetPageCompleted

GetPageAsync 完成时发生。Occurs when GetPageAsync has completed.

PagesChanged

在文档内容改变时发生。Occurs when the document content is changed.

适用于