Windows Dev Center

Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

FixedDocument.DocumentPaginator Property

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

Namespace:  System.Windows.Documents
Assembly:  PresentationFramework (in PresentationFramework.dll)

public DocumentPaginator DocumentPaginator { get; }

Property Value

Type: System.Windows.Documents.DocumentPaginator
An object of a class derived from DocumentPaginator that provides pagination services.

Implements

IDocumentPaginatorSource.DocumentPaginator

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.

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

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

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

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft