Back to Devexpress

Wizard Customization Overview

xtrareports-118019-desktop-reporting-wpf-reporting-end-user-report-designer-for-wpf-api-and-customization-wizard-customization-overview.md

latest4.9 KB
Original Source

Wizard Customization Overview

  • Aug 18, 2023
  • 4 minutes to read

The Report Wizard allows you to create new reports and customize existing ones in the End-User Report Designer. The Report Wizard includes Data Source Wizard pages for binding a report to data and adds extra pages for configuring the report layout.

Wizard Structural Elements

The Wizard architecture conforms to the MVP (Model-View-Presenter) design pattern and includes the following structural elements:

  • Presenter

  • View

  • Model

You can create a custom wizard page using the following approaches:

  • Provide your custom appearance for a specific wizard page by creating a XAML template with the required ViewModel type referenced by a Key. The specified Key is used to locate the corresponding template automatically.

  • Customize an existing wizard page by inheriting from its Presenter and View objects.

  • Create a custom wizard page from scratch by implementing a page Presenter, View, and Model (optional). Inherit the page Presenter from the abstract WizardPageBase<TView, TModel> class (the DevExpress.Data.WizardFramework namespace). To implement the View, inherit a ViewModel from the WizardPageBase class (the DevExpress.Xpf.DataAccess.DataSourceWizard namespace) and write a XAML template. To add custom fields to the Model, create the XtraReportModel class descendant.

Wizard Customization API

You can customize the Report and/or Data Source Wizard by implementing the IWizardCustomizationService interface, which provides the following four methods:

Both the CustomizeDataSourceWizard and CustomizeReportWizard methods receive two arguments:

To apply the wizard customization, assign your custom IWizardCustomizationService instance to the ReportDesignerBase.ServicesRegistry property.

Code Examples

The following code examples demonstrate how to customize the Report Wizard: