Skip to main content
A newer version of this page is available. .

Remove Dock Panels from the End-User Report Designer

  • 2 minutes to read

The DesignDockPanelType enumeration lists the End-User Report Designer’s default dock panels.

This example illustrates how to remove dock panels from the Report Designer using the IDesignForm.SetWindowVisibility method.

using DevExpress.XtraReports.UI;
using DevExpress.XtraReports.UserDesigner;
// ...

private void button1_Click(object sender, System.EventArgs e) {
    // Create a Design Tool with an assigned report instance.
    ReportDesignTool designTool = new ReportDesignTool(new XtraReport1());

    // Access the standard or ribbon-based Designer form.
    // IDesignForm designForm = designTool.DesignForm;
    IDesignForm designForm = designTool.DesignRibbonForm;

    //disable saving of the designer panels configuration
    (designForm as XRDesignForm).SaveState = false;
    // Hide the Field List and Property Grid dock panels.
    designForm.SetWindowVisibility(DesignDockPanelType.FieldList |
        DesignDockPanelType.PropertyGrid, false);

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

These panels are removed from the Report Designer’s toolbar, making it impossible for end-users to access them and change their visibility:

A ribbon toolbar‘s menu:

set-window-visibility-ribbon-toolbar

A standard toolbar‘s menu:

set-window-visibility-standard-toolbar

See Also