This example demonstrates how to use our WPF GridControl's styles and templates to customize the appearance of printed or exported (WYSIWYG mode) content.
View File: PrintCustomCells/MainWindow.xaml
This project creates a custom PrintCellStyle for grid columns. In this sample project, the GridControl contains MemoEdit, CheckEdit, and PopupImageEdit editors:
Here is the output in print preview mode:
View File: PrintCustomRows/MainWindow.xaml
This project uses the PrintRowTemplate property to fully alter the layout of printed rows. This project also customizes column headers (PrintHeaderTemplate) and our WPF Data Grid’s total summary panel (PrintFooterTemplate).
Here is the layout used for this example:
And here is the print preview for this particular example:
View File: PrintCustomGroupRows/MainWindow.xaml
This project uses the PrintGroupRowTemplate property to display images in printed group rows. It also removes parentheses from group summaries.
Here’s the print preview for this particular example:
- Print and Export Data
- ColumnBase.PrintCellStyle
- PrintRowTemplate
- PrintHeaderTemplate
- PrintFooterTemplate
- PrintGroupRowTemplate
- WPF Data Grid - Print and Export the GridControl
- WPF Data Grid - Create a Print Page Header and Footer
(you will be redirected to DevExpress.com to submit your response)