Home › Forums › WPF controls › Xceed DataGrid for WPF › print preview
I set some headers and footers with DataGridControl.PrintView and I need to see how this appears before effectively printing
is there a possibility to print preview? Or you know something about this, if will be available in the near future?
Imported from legacy forums. Posted by winnetou (had 669 views)
There’s currently no print preview available. It is in our wishlist and it will be looked at when time comes.
For now, the workaround would be to create a simple print-preview yourself by exporting the fist few pages to a XpsDocument and then by showing the said document in another Window.
Here’s a quick sample on how to do it…
<code> Size pageSize = new Size( 8.5d * 96.0d, 11.0d * 96.0d ); grid.ExportToXps( @”d:\test.xps”, pageSize, new Rect( pageSize ), new PageRange( 1, 3 ), true );
XpsDocument document = new XpsDocument( @”d:\test.xps”, System.IO.FileAccess.Read );
DocumentViewer viewer = new DocumentViewer();
viewer.Document = document.GetFixedDocumentSequence() as IDocumentPaginatorSource;
Window previewWindow = new Window();
previewWindow.Content = viewer;
Imported from legacy forums. Posted by PL (had 451 views)
is there an option for print preview in 2.0 version?
Imported from legacy forums. Posted by winnetou (had 453 views)
No — but I’ll bring it up as a request for v2.2 (v2.1’s feature set does not include it, and there’s no room at the moment to add anything else).
Imported from legacy forums. Posted by Odi [Xceed] (had 3824 views)