FixedDocument.DocumentPaginator Egenskap

Definition

Hämtar sidnumreringstjänsten för som FixedDocument tillhandahåller sidorienterade tjänster, till exempel att hämta en viss sida och redigera om som svar på ändringar.

public:
 property System::Windows::Documents::DocumentPaginator ^ DocumentPaginator { System::Windows::Documents::DocumentPaginator ^ get(); };
public System.Windows.Documents.DocumentPaginator DocumentPaginator { get; }
member this.DocumentPaginator : System.Windows.Documents.DocumentPaginator
Public ReadOnly Property DocumentPaginator As DocumentPaginator

Egenskapsvärde

Ett objekt i en klass som härleds från DocumentPaginator som tillhandahåller sidnumreringstjänster.

Implementeringar

Exempel

I följande exempel visas hur du skapar en FixedDocument sidnumrering som har konfigurerats för en viss sidstorlek.

// ------------------------ 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

I följande exempel visas även användningen av DocumentPaginator egenskapen.

// ------------------------ 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

Kommentarer

Om du behöver en sidnumrering med automatisk omskrivning i svar på ändringar, till exempel att lägga till innehåll i dokumentet, härleder du en klass som DynamicDocumentPaginator i sig ärver från DocumentPaginator.

Gäller för