Skip to Main Content
Programming WPF, 2nd Edition
book

Programming WPF, 2nd Edition

by Chris Sells, Ian Griffiths
August 2007
Intermediate to advanced content levelIntermediate to advanced
864 pages
25h 52m
English
O'Reilly Media, Inc.
Content preview from Programming WPF, 2nd Edition

XPS Document Classes

The classes for working with XPS documents are spread across several namespaces, because there are several different levels at which you may wish to work. Table 15-1 shows the various namespaces that contain XPS functionality, and the scenarios for which they are intended.

Table 15-1. Namespaces for working with XPS

Namespace

Purpose of classes

System.Windows.Documents

Contains classes that represent the logical internal structure of XPS documents, and which also add extra runtime functionality for constructing documents

System.Windows.Xps

Abstract API for creating XPS documents, for either printing or writing to disk

System.Windows.Xps.Serialization

Provides fine-grained control of how the XPS file's contents are generated

System.Windows.Xps.Packaging

Provides access to package-level aspects of XPS, such as loading and saving XPS documents, or adding thumbnail images

System.IO.Packaging

Allows reading and writing of any OPC file (not limited to XPS)

XPS file structure is most directly represented by the classes in the System.Windows.Xps.Packaging namespace. If you want to work directly with the streams of data that make up an XPS file, these classes will give you the most control. However, they are not all that convenient to use because of their low-level nature. There is an even lower level beneath the XPS packaging classes: the System.IO.Packaging namespace implements OPC. This is the foundation on which the XPS packaging classes are built. Although you could use the lowest-level ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Programming C#, 4th Edition

Programming C#, 4th Edition

Jesse Liberty
Programming C# 10

Programming C# 10

Ian Griffiths

Publisher Resources

ISBN: 9780596510374Supplemental ContentErrata Page