This documentation is archived and is not being maintained.

PageContent Class

Provides information about the FixedPage elements within a FixedDocument.

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

public sealed class PageContent : FrameworkElement, 
	IAddChild, IUriContext

PageContent elements are the only allowable child elements of a FixedDocument. The order of the PageContent elements within the FixedDocument defines the page order.

PageContent provides information about the FixedPage elements within a FixedDocument without the requiring the application to load individual pages.

The Source dependency property specifies the uniform resource identifier (URI) of the corresponding FixedPage.

For more information about the PageContent element, see Chapter 3 of the XPS Open XML Paper Specification available for download at XPS: Specification and License Downloads.

The following example shows the process of adding PageContent to a FixedDocument. For the full sample, see Saving an XPS Document Sample.

// ------------------- CreateFixedDocumentWithPages ------------------- 
/// <summary> 
///   Creates a FixedDocument with fixed pages.</summary> 
/// <returns> 
///   A FixedDocument containing fixed pages.</returns> 
public FixedDocument CreateFixedDocumentWithPages()
    // Create a FixedDocument
    FixedDocument fixedDocument = CreateFixedDocument();

    // Add Page 1 to a fixed document
    PageContent page1Content = CreateFirstPageContent();

    // Adding Page 2 to a fixed document
    PageContent page2Content = CreateSecondPageContent();

    // Adding Page 3 to a fixed document
    PageContent page3Content = CreateThirdPageContent();

    // Adding Page 4 to a fixed document;
    PageContent page4Content = CreateFourthPageContent();

    // Adding Page 5 to a fixed document;
    PageContent page5Content = CreateFifthPageContent();

    return fixedDocument;
}// end:CreateFixedDocumentWithPages()

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0