Set the Input Focus of Dock Panels in the End-User Report Designer
- 2 minutes to read
This example illustrates how to switch the input focus to a specific dock panel of a Report Designer. This code switches the input focus to the Field List (instead of the Report Explorer that has the input focus set to it by default).
Important
Customization options described in this help topic are available to owners of DevExpress WinForms, DXperience, and Universal subscriptions (subscriptions that include DevExpress WinForms UI Controls). The DevExpress Reporting Subscription does not support UI customization in Report Viewer or End-User Report Designer. You can use ReportPrintTool and ReportDesignTool classes to display Print Preview and End-User Report Designer in their default configurations.
Refer to the following help topic for information on subscription options: Installation - Subscriptions that Include Reporting Components.
Note
All the Report Designer’s dock panels inherit their settings from the DesignDockPanel class which is a DockPanel class descendant.
For this reason, you need to reference the DevExpress.XtraBars.v25.2 library in your application to be able to access the Report Designer’s dock panel settings.
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 and its MDI Controller.
// IDesignForm designForm = designTool.DesignForm;
IDesignForm designForm = designTool.DesignRibbonForm;
// Access the Field List and bring it to front.
designForm.DesignDockManager[DesignDockPanelType.FieldList].Show();
// Load a Report Designer in a dialog window.
// designTool.ShowDesignerDialog();
designTool.ShowRibbonDesignerDialog();
}