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.

PageContent Class

Provides information about the FixedPage elements within a FixedDocument.

Namespace: System.Windows.Documents
Assembly: PresentationFramework (in presentationframework.dll)
XML Namespace:  http://schemas.microsoft.com/winfx/2006/xaml/presentation

[ContentPropertyAttribute("Child")] 
public sealed class PageContent : FrameworkElement, IAddChild, IUriContext
/** @attribute ContentPropertyAttribute("Child") */ 
public final class PageContent extends FrameworkElement implements IAddChild, IUriContext
ContentPropertyAttribute("Child") 
public final class PageContent extends FrameworkElement implements IAddChild, IUriContext
<PageContent>
  Child
</PageContent>

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();
    fixedDocument.Pages.Add(page1Content);

    // Adding Page 2 to a fixed document
    PageContent page2Content = CreateSecondPageContent();
    fixedDocument.Pages.Add(page2Content);

    // Adding Page 3 to a fixed document
    PageContent page3Content = CreateThirdPageContent();
    fixedDocument.Pages.Add(page3Content);

    // Adding Page 4 to a fixed document;
    PageContent page4Content = CreateFourthPageContent();
    fixedDocument.Pages.Add(page4Content);

    // Adding Page 5 to a fixed document;
    PageContent page5Content = CreateFifthPageContent();
    fixedDocument.Pages.Add(page5Content);

    return fixedDocument;
}// end:CreateFixedDocumentWithPages()

System.Object
   System.Windows.Threading.DispatcherObject
     System.Windows.DependencyObject
       System.Windows.Media.Visual
         System.Windows.UIElement
           System.Windows.FrameworkElement
            System.Windows.Documents.PageContent

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 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft