Skip to main content

DesignerLoadedEventArgs Class

Namespace: DevExpress.XtraReports.UserDesigner

Assembly: DevExpress.XtraReports.v22.1.dll


public class DesignerLoadedEventArgs :


The XtraReport.DesignerLoaded and XRDesignPanel.DesignerHostLoaded events occur after any report has been loaded into the End-User Designer. The DesignerLoadedEventArgs class introduces the DesignerLoadedEventArgs.DesignerHost property that specifies the designer host, which provides all the services used when editing a report.


DesignerLoadedEventArgs objects are automatically created, initialized and passed to the XtraReport.DesignerLoaded or XRDesignPanel.DesignerHostLoaded event handler.


This example illustrates how to add a custom control to an End-User Report Designer’s toolbox by handling the XtraReport.DesignerLoaded event and accessing the toolbox service.


This code adds the XRZipCode control to the toolbox. It is hidden by default because most countries do not use it.

See Use Custom Controls to learn how to create custom report controls and add them to a Report Designer’s toolbox.

using DevExpress.XtraReports.UI;
using DevExpress.XtraReports.UserDesigner;
using System.Drawing.Design;
// ...

private void button1_Click(object sender, System.EventArgs e) {
    // Create a report instance.
    XtraReport1 report = new XtraReport1();

    // Create a Design Tool and assign the report to it.
    ReportDesignTool designTool = new ReportDesignTool(report);

    // Handle the DesignerLoaded event of the report.
    report.DesignerLoaded += report_DesignerLoaded;

    // Load a Report Designer in a dialog window.
    // designTool.ShowDesignerDialog();

void report_DesignerLoaded(object sender, DesignerLoadedEventArgs e) {
    // Access the Toolbox service.
    IToolboxService toolboxService = 

    // Add a custom control to the default category.
    toolboxService.AddToolboxItem(new ToolboxItem(typeof(XRZipCode)));

    // Add a custom control to a new category.
    // toolboxService.AddToolboxItem(new ToolboxItem(typeof(XRZipCode)), "New Category");


See Also