Esporta (0) Stampa
Espandi tutto

Classe PageContent

Provides information about the FixedPage elements within a FixedDocument.

Spazio dei nomi: System.Windows.Documents
Assembly: PresentationFramework (in presentationframework.dll)
Spazio dei nomi XML:  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

I membri statici pubblici (Shared in Visual Basic) di questo tipo sono validi per le operazioni multithreading. I membri di istanza non sono garantiti come thread safe.

Microsoft .NET Framework 3.0 è supportato in Windows Vista, Microsoft Windows XP SP2 e Windows Server 2003 SP1.

.NET Framework

Supportato in:

Aggiunte alla community

AGGIUNGI
Mostra:
© 2015 Microsoft