A newer version of this page is available. Switch to the current version.

XRPanel Class

A Panel control that can contain other controls.

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v18.2.dll


public class XRPanel :
Public Class XRPanel
    Inherits XRControl


An XRPanel object can be used to group individual report controls into collections. Controls placed onto an XRPanel control can be moved, copied, pasted, etc. along with the panel which contains them. The collection of contained controls is accessed via the XRControl.Controls property of the XRPanel object.


It is not possible to place an XRSubreport into the XRPanel control, because this results in an incorrect construction of the report document.

To learn more about the XRPanel control, see the Adding Controls to a Report topic.


The following method creates an XRPanel object, then creates an XRControl object, and adds it to the created panel.

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

public XRPanel CreateXRPanel() {
   // Create a panel.
   XRPanel xrPanel = new XRPanel();

   // Set its background color.
   xrPanel.BackColor = Color.Blue;

   // Set its size.
   xrPanel.SizeF = new SizeF(200F, 100F);

   // Create an XRControl object.
   XRControl xrControl = new XRControl();

   // Set its background color.
   xrControl.BackColor = Color.Aquamarine;

   // Set its size.
   xrControl.SizeF = new SizeF(100F, 50F);

   // Add a control to the panel.

   return xrPanel;


See Also