Back to Devexpress

How to: Customize Export Options of the Printing System

expressappframework-113283-shape-export-print-data-printing-exporting-in-list-view-how-to-customize-export-options-of-the-printing-system.md

latest2.0 KB
Original Source

How to: Customize Export Options of the Printing System

  • May 20, 2025
  • 3 minutes to read

In a Windows Forms XAF application, end-users have an ability to export View print previews to various formats. Before exporting, an Export Options dialog is invoked. The format-specific options can be changed using this dialog, for example, the HTML title or XLS sheet name.

Note

To learn how to specify export options for reports, refer to the How to: Customize the Report Export Options topic.

  • The PrintingController, supplied with the System module, exposes the PrintingController.PrintingSettingsLoaded event. You can handle this event to access the PrintingSystem object and modify default export options. To do this, implement the following View Controller:

  • Run the Windows Forms application. Execute the PrintPreview Action in any View. In the invoked Preview dialog, click File | Export Document… and select the export format. You will see that the default export settings are changed (modified settings are highlighted in the screenshot).

  • If it is required to disable the Export Options dialog and always use the default options, add the following code to the SetGeneralOptions method:

See Also

ExportOptions

How to: Customize the Export Action Behavior