Windows apps
Collapse the table of content
Expand the table of content
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

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

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.

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
Available since 3.0
Return to top
Show:
© 2017 Microsoft