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

适用于