SerializerWriter.CreateVisualsCollator Method

When overridden in a derived class, returns a SerializerWriterCollator that writes collated Visual elements to the serialization Stream.

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

  Name Description
Public method CreateVisualsCollator() When overridden in a derived class, returns a SerializerWriterCollator that writes collated Visual elements.
Public method CreateVisualsCollator(PrintTicket, PrintTicket) When overridden in a derived class, returns a SerializerWriterCollator that writes collated Visual elements together with the given print tickets.
Top

The following example shows the use of the CreateVisualsCollator method.

private void SaveVisuals(XpsDocumentWriter xpsdw, List<Visual> vc)
{
    // Setup for writing multiple visuals
    VisualsToXpsDocument vToXpsD = (VisualsToXpsDocument)xpsdw.CreateVisualsCollator();

    // Iterate through all visuals in the collection 
    foreach (Visual v in vc)
    {
        vToXpsD.Write(v);   //Write each visual to single page
    }

    // End writing multiple visuals
    vToXpsD.EndBatchWrite();
}
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft