Back to Devexpress

XRDesignForm Class

xtrareports-devexpress-dot-xtrareports-dot-userdesigner-4f920234.md

latest6.5 KB
Original Source

XRDesignForm Class

The standard End-User Report Designer form.

Namespace : DevExpress.XtraReports.UserDesigner

Assembly : DevExpress.XtraReports.v25.2.Extensions.dll

NuGet Package : DevExpress.Win.Reporting

Declaration

csharp
public class XRDesignForm :
    XtraForm,
    IDesignForm,
    IDisposable,
    ISupportLookAndFeel
vb
Public Class XRDesignForm
    Inherits XtraForm
    Implements IDesignForm,
               IDisposable,
               ISupportLookAndFeel

Remarks

The XRDesignForm represents a standard End-User Designer form with a multi-document interface.

To show the XRDesignForm , call its Show ( ShowDialog ) method, or the ReportDesignTool.ShowDesigner (ReportDesignTool.ShowDesignerDialog) method.

An End-User Designer form links together an XRDesignMdiController (containing the XRDesignPanel class instances), the Main Menu, Status Bar, various toolbars (represented by an XRDesignBarManager object), and dock panels (represented by an XRDesignDockManager object).

To visually inherit from the End-User Designer form, drop the StandardReportDesigner component onto a form from the DX.25.2: Reporting Toolbox tab. To learn more on this, refer to Create a Custom End-User Report Designer.

The currently active XRDesignPanel of the XRDesignMdiController can be accessed via the XRDesignForm.ActiveDesignPanel property.

Note

Alternatively, you can use the XRDesignRibbonForm class, which provides an End-User Designer with an improved Ribbon interface.

See Report Designer to learn more.

Example

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

csharp
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 Properties window dock panels.
    designForm.SetWindowVisibility(DesignDockPanelType.FieldList |
        DesignDockPanelType.PropertyGrid, false);

    // Load a Report Designer in a dialog window.
    // designTool.ShowDesignerDialog();
    designTool.ShowRibbonDesignerDialog();
}
vb
Imports DevExpress.XtraReports.UI
Imports DevExpress.XtraReports.UserDesigner
' ...

Private Sub button1_Click(sender As Object, e As System.EventArgs)
    ' Create a Design Tool with an assigned report instance.
    Dim designTool As New ReportDesignTool(New XtraReport1())

    ' Access the standard or ribbon-based Designer form.
    ' Dim designForm As IDesignForm = designTool.DesignForm
    Dim designForm As IDesignForm = designTool.DesignRibbonForm

    'disable saving of the designer panels configuration
    TryCast(designerForm, XRDesignForm).SaveState = False
    ' Hide the Field List and Properties window dock panels.
    designForm.SetWindowVisibility(DesignDockPanelType.FieldList Or _ 
        DesignDockPanelType.PropertyGrid, False)

    ' Load a Report Designer in a dialog window.
    ' designTool.ShowDesignerDialog()
    designTool.ShowRibbonDesignerDialog()
End Sub

Implements

IDesignForm

Inheritance

Show 11 items

Object MarshalByRefObject Component Control ScrollableControl ContainerControl Form DevExpress.XtraEditors.DForm DevExpress.XtraEditors.MouseWheelContainerForm XtraForm XRDesignForm

See Also

XRDesignForm Members

XRDesignRibbonForm

End-User Report Designer for WinForms

DevExpress.XtraReports.UserDesigner Namespace