Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

FixedPage Class

Provides the content for a high fidelity, fixed-format page.

Namespace:  System.Windows.Documents
Assembly:  PresentationFramework (in PresentationFramework.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation
[ContentPropertyAttribute("Children")]
public sealed class FixedPage : FrameworkElement, 
	IAddChild, IUriContext
<FixedPage>
  Children
</FixedPage>

FixedPage is typically used to provide the content for a page within a FixedDocument.

FixedPage automatically defines page breaks at the start and end of its content.

The following example shows use of the FixedPage class. For the full sample, see Saving an XPS Document Sample.

// --------------------- CreateFifthPageContent ----------------------- 
/// <summary> 
///   Creates the content for the fifth fixed page.</summary> 
/// <returns> 
///   The page content for the fifth fixed page.</returns> 
private PageContent CreateFifthPageContent()
{
    PageContent pageContent = new PageContent();
    FixedPage   fixedPage   = new FixedPage();
    UIElement   visual      = CreateThirdVisual(false);

    FixedPage.SetLeft(visual, 0);
    FixedPage.SetTop(visual, 0);

    double pageWidth = 96 * 8.5;
    double pageHeight = 96 * 11;

    fixedPage.Width = pageWidth;
    fixedPage.Height = pageHeight;

    fixedPage.Children.Add((UIElement)visual);

    Size sz = new Size(8.5 * 96, 11 * 96);
    fixedPage.Measure(sz);
    fixedPage.Arrange(new Rect(new Point(), sz));
    fixedPage.UpdateLayout();

    ((IAddChild)pageContent).AddChild(fixedPage);
    return pageContent;
}// end:CreateFifthPageContent()
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
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.