This documentation is archived and is not being maintained.

VisualsToXpsDocument Class

Provides methods for writing Visual objects to XML Paper Specification (XPS) documents or to a print queue in batch mode. 

Namespace:  System.Windows.Xps
Assembly:  System.Printing (in System.Printing.dll)

public ref class VisualsToXpsDocument : public SerializerWriterCollator

The VisualsToXpsDocument type exposes the following members.

  NameDescription
Public methodBeginBatchWriteIndicates that write operations can begin. (Overrides SerializerWriterCollator::BeginBatchWrite().)
Public methodCancelCancels a synchronous writing operation. (Overrides SerializerWriterCollator::Cancel().)
Public methodCancelAsyncCancels an asynchronous writing operation. (Overrides SerializerWriterCollator::CancelAsync().)
Public methodEndBatchWriteIndicates that write operations must end. (Overrides SerializerWriterCollator::EndBatchWrite().)
Public methodEquals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Public methodWrite(Visual)Writes a Visual synchronously to an XpsDocument or a PrintQueue. (Overrides SerializerWriterCollator::Write(Visual).)
Public methodWrite(Visual, PrintTicket)Writes a Visual synchronously to an XpsDocument or a PrintQueue and includes a PrintTicket. (Overrides SerializerWriterCollator::Write(Visual, PrintTicket).)
Public methodWriteAsync(Visual)Writes a Visual asynchronously to an XpsDocument or a PrintQueue. (Overrides SerializerWriterCollator::WriteAsync(Visual).)
Public methodWriteAsync(Visual, Object)Writes a Visual asynchronously to an XpsDocument or a PrintQueue and includes additional information that the caller wants to pass to an event handler. (Overrides SerializerWriterCollator::WriteAsync(Visual, Object).)
Public methodWriteAsync(Visual, PrintTicket)Writes a Visual asynchronously to an XpsDocument or a PrintQueue and includes a PrintTicket. (Overrides SerializerWriterCollator::WriteAsync(Visual, PrintTicket).)
Public methodWriteAsync(Visual, PrintTicket, Object)Writes a Visual asynchronously to an XpsDocument or a PrintQueue; also includes a PrintTicket and any additional information that the caller wants to pass to an event handler. (Overrides SerializerWriterCollator::WriteAsync(Visual, PrintTicket, Object).)
Top

Because this class has no constructor, use the CreateVisualsCollator method to create an instance.

The VisualsToXpsDocument writes to the same target XpsDocument or PrintQueue as the XpsDocumentWriter that creates the VisualsToXpsDocument.

Each Visual becomes a page in the document.

The following example shows how to create a visuals collator and use it to write to an XML Paper Specification (XPS) document.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show: