GoXam for WPF v3
Paginate Method
Northwoods.GoXam Namespace > PrintManager Class : Paginate Method
an Action<DocumentPaginator> that is called with a DocumentPaginator with initialization work beforehand and cleanup work afterwards.
Use a DocumentPaginator in a safe manner.
Syntax
public void Paginate( 
   Action<DocumentPaginator> act
)

Parameters

act
an Action<DocumentPaginator> that is called with a DocumentPaginator with initialization work beforehand and cleanup work afterwards.
Remarks
Here is one way to create a print-preview capability, assuming docViewer is a DocumentViewer control and tempfilename is a temporary disk file path: var xpsDocument = new XpsDocument(tempfilename, FileAccess.ReadWrite); myDiagram.PrintManager.Paginate(pager => { var dlg = new PrintDialog(); pager.PageSize = new Size(dlg.PrintableAreaWidth, dlg.PrintableAreaHeight); var writer = XpsDocument.CreateXpsDocumentWriter(xpsDocument); writer.Write(pager); docViewer.Document = xpsDocument.GetFixedDocumentSequence(); });
See Also

Reference

PrintManager Class
PrintManager Members