The requested page is not available for the requested platform. You are viewing the content for Default platform.

WinReportServiceController.DesignFormCreated Event

Occurs after the Report Designer form is created, but before a report is loaded into it.

Namespace: DevExpress.ExpressApp.Reports.Win

Assembly: DevExpress.ExpressApp.Reports.Win.v19.1.dll


public event EventHandler<DesignFormEventArgs> DesignFormCreated
Public Event DesignFormCreated As EventHandler(Of DesignFormEventArgs)

Event Data

The DesignFormCreated event handler receives an argument of the DevExpress.ExpressApp.Reports.Win.DesignFormEventArgs type.


Handle this event to customize the design form. You can, for example, add or remove particular items from the design form toolbox.

using System.Drawing.Design;
using DevExpress.ExpressApp;
using DevExpress.ExpressApp.Reports.Win;
using DevExpress.XtraReports.UI;
using DevExpress.XtraReports.UserDesigner;
public class ReportToolBoxController : ViewController {
    private WinReportServiceController reportService;
    protected override void OnActivated() {
        reportService = Frame.GetController<WinReportServiceController>();
        if (reportService != null)
            reportService.DesignFormCreated += reportService_DesignFormCreated;
    void reportService_DesignFormCreated(object sender, DesignFormEventArgs e) {
        e.Report.DesignerLoaded += Report_DesignerLoaded;
    void Report_DesignerLoaded(object sender, DesignerLoadedEventArgs e) {
        IToolboxService ts = (IToolboxService)e.DesignerHost.GetService(typeof(IToolboxService));
        ts.AddToolboxItem(new ToolboxItem(typeof(MyControl)), "New Category");
    protected override void OnDeactivated() {
        if (reportService != null)
            reportService.DesignFormCreated -= reportService_DesignFormCreated;
public class MyControl : XRControl {
See Also