PageContent Class
Provides information about the FixedPage elements within a FixedDocument.
Assembly: PresentationFramework (in PresentationFramework.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation
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.Windows.Threading.DispatcherObject
System.Windows.DependencyObject
System.Windows.Media.Visual
System.Windows.UIElement
System.Windows.FrameworkElement
System.Windows.Documents.PageContent
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.