Share via


DocumentPaginator.PageSize 屬性

定義

在衍生類別中覆寫時,取得或設定每個頁面的建議寬度和高度。

public:
 abstract property System::Windows::Size PageSize { System::Windows::Size get(); void set(System::Windows::Size value); };
public abstract System.Windows.Size PageSize { get; set; }
member this.PageSize : System.Windows.Size with get, set
Public MustOverride Property PageSize As Size

屬性值

Size

Size,表示每個頁面的寬度和高度。

範例

下列範例會示範如何設定 PageSize

// ------------------------ CreateFixedDocument -----------------------
/// <summary>
///   Creates an empty FixedDocument.</summary>
/// <returns>
///   An empty FixedDocument without any content.</returns>
private FixedDocument CreateFixedDocument()
{
    FixedDocument fixedDocument = new FixedDocument();
    fixedDocument.DocumentPaginator.PageSize = new Size(96 * 8.5, 96 * 11);
    return fixedDocument;
}
' ------------------------ CreateFixedDocument -----------------------
''' <summary>
'''   Creates an empty FixedDocument.</summary>
''' <returns>
'''   An empty FixedDocument without any content.</returns>
Private Function CreateFixedDocument() As FixedDocument
    Dim fixedDocument As New FixedDocument()
    fixedDocument.DocumentPaginator.PageSize = New Size(96 * 8.5, 96 * 11)
    Return fixedDocument
End Function

備註

DocumentPaginator可能會覆寫這個屬性的值。 使用者應該檢查 DocumentPage.Size

適用於