Home Forums WPF controls Xceed DataGrid for WPF print preview

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #24462 |

    Hello all.

    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?

    Thanks, Liviu

    Imported from legacy forums. Posted by winnetou (had 669 views)

    User (Old forums)
    Member
    Post count: 23064

    Hi Liviu,

    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;

    previewWindow.Show();
    </code>

    Imported from legacy forums. Posted by PL (had 451 views)

    User (Old forums)
    Member
    Post count: 23064

    Hi there,

    is there an option for print preview in 2.0 version?

    Regards,
    winnetou

    Imported from legacy forums. Posted by winnetou (had 453 views)

    Odi [Xceed]
    Spectator
    Post count: 426

    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)

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.