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

Hide Dock Panels in the Report Designer

The standard End-User Report Designer contains various dock panels, such as the Field List, Report Explorer, Group and Sort Panel, etc. This document demonstrates how to hide dock panels, which are redundant in particular scenarios.

To hide a specific dock panel or a group containing several dock panels, do the following.

  1. Create a new WPF application with the Report Designer or open an existing application.
  2. Handle the Report Designer's Loaded event.
  3. In the event handler, find the DockLayoutManager in the visual tree using the LayoutTreeHelper.GetVisualChildren method.
  4. Obtain the required layout panel or layout group located within the DockLayoutManager. For this, use the GetItem extension method and pass an appropriate field of the DockLayoutManagerItemsNames class to this method as a parameter.
  5. Remove the obtained item from the parent layout group.

The code below illustrates how to hide the Field List and the Group and Sort Panel.

using DevExpress.Mvvm.UI;
using DevExpress.Xpf.Docking;
using DevExpress.Xpf.Reports.UserDesigner;
using System.Linq;
using System.Windows;

private void reportDesigner_Loaded(object sender, RoutedEventArgs e) {
    // Obtain the Dock Layout Manager.
    var dockLayoutManager = LayoutTreeHelper.GetVisualChildren(reportDesigner).OfType<DockLayoutManager>().First();

    // Access and hide the Group and Sort panel.
    var groupSortPanel = dockLayoutManager.GetItem(DockLayoutManagerItemsNames.GroupSortPanel);

    // Access and hide the Field List.
    var fieldList = dockLayoutManager.GetItem(DockLayoutManagerItemsNames.FieldListPanel);