Document Viewer in WinUI Applications
- 2 minutes to read
The DocumentViewer is a WinUI control that allows users to create documents from DevExpress reports, and display, save, export, and print them.
Reporting WinUI demos are available in the Demo Center application. Review the following topic for more information: Reporting Demo Applications.
DevExpress WinUI controls have the following system requirements:
- Windows 10 version 1809 (build 17763) and higher
- Visual Studio 2022 version 17.1 and higher (recommended) or Visual Studio 2019
- Required workloads and components as listed in the following section: Install tools for the Windows App SDK
- Windows App SDK Version 1.0.2 Visual Studio extension
DevExpress WinUI Reporting requires an active DevExpress Reporting Subscription.
The Visual Studio Report Designer requires the DevExpress Reporting components installed on the development host.
The following NuGet packages are required:
Review the following topic: Get Started with WinUI Reporting.
Use the DocumentSource property to display a report document in the DocumentViewer.
Call the Save method to save the opened document in PRNX format to the specified file at the specified location.
Call the ShowSaveDialogCommand method or click the Save As button in the toolbar to open the Save As dialog.
Use the Export method to save the opened document in one of the following formats:
You can also use the ShowExportDialogCommand or click the Export button in the toolbar to open the Export dialog.
Use the ShowPrintDialogCommand or click the Print button in the toolbar to open the Print dialog.