語言

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,但具備非同步操作。

適用於