Share via


DynamicDocumentPaginator.GetPageNumber(ContentPosition) 方法

定义

在派生类中重写时,返回指定 ContentPosition 的从零开始的页码。

public:
 abstract int GetPageNumber(System::Windows::Documents::ContentPosition ^ contentPosition);
public abstract int GetPageNumber (System.Windows.Documents.ContentPosition contentPosition);
abstract member GetPageNumber : System.Windows.Documents.ContentPosition -> int
Public MustOverride Function GetPageNumber (contentPosition As ContentPosition) As Integer

参数

contentPosition
ContentPosition

需要其页码的内容位置。

返回

一个 Int32,表示从零开始的页码,其中显示指定的 contentPosition

注解

如果 之前 contentPosition 的页面尚未格式化,则会在返回请求的页码之前同步分页。

GetPageNumberAsync 提供与 GetPageNumber类似的功能,但具有异步操作。

适用于