FixedDocument.DocumentPaginator Property

Definition

Gets the paginator for the FixedDocument that provides page-oriented services such as getting a particular page and repaginating in response to changes.

C#
public System.Windows.Documents.DocumentPaginator DocumentPaginator { get; }

Property Value

An object of a class derived from DocumentPaginator that provides pagination services.

Implements

Examples

The following example shows how to create a FixedDocument that has a paginator configured for a particular page size.

C#
// ------------------------ 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;
}

The following example also shows use of the DocumentPaginator property.

C#
// ------------------------ 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;
}

Remarks

If you need a paginator with automatic repagination in responses to changes, such as adding content to the document, derive a class from DynamicDocumentPaginator which itself inherits from DocumentPaginator.

Applies to

Produkt Verzie
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10