Resource Page DescriptionThe following table contains sample XPS applications that demonstrate how to perform some common programming tasks by using the native XPS Document API and the managed code .NET Framework.
| Sample Name | Native Sample | Managed Code Sample | Description |
| XpsAllSamples | NativeXpsAllSamples.zip | ManagedXpsAllSamples.zip | All programming examples in a single download. |
| XpsFlowText | NativeXpsFlowText.zip | ManagedXpsFlowText.zip | Demonstrates how to place text on a page in an XPS document. The native sample also demonstrates how to use DirectWrite to create a text layout to place on an XPS page. For more information about this example, see FlowText. |
| XpsLoadModifySave | NativeXpsLoadModifySave.zip | ManagedXpsLoadModifySave.zip | Demonstrates how to load an XPS document, modify the contents, and then save the modified document. For more information about this example, see XpsLoadModifySave. |
| XpsMailMerge | NativeXpsMailMerge.zip | N/A | Demonstrates how to use named fields in an XPS document to merge data into an XPS document programmatically. This example is not applicable for managed code. |
| XpsOMPrint | NativeXpsOMPrint.zip | N/A | Demonstrates how to print an XPS OM by using the XPS Print API. This example is not applicable for managed code. For more information about this example, see XpsOMPrint. |
| XpsOnePage | NativeXpsOnePage.zip | N/A | Demonstrates how to create an XPS document with one blank page and write it to a file. This sample includes two programs: one creates an XPS OM and then writes it to a file as an XPS document and the other uses the IXpsOMPackageWriter interface to write the XPS document as a file. For more information about this example, see XpsOnePage. |
| XpsRollup | NativeXpsRollup.zip | ManagedXpsRollup.zip | Demonstrates how to combine multiple XPS documents into a single XPS document and rename the resource parts in the merged document to prevent part name conflicts. This sample illustrates how to identify and navigate the component parts of an XPS document. For more information about this example, see XpsRollup. |
For more information about the native XPS Document API, see Documents in the MSDN library. For more information about the XPS document classes in the .NET Framework, see the System.Windows.Xps Namespace, System.Windows.Xps.Packaging Namespace, and System.Windows.Xps.Serialization Namespace in the MSDN library.
|