Skip to main content

XRPanel() Constructor

Initializes a new instance of the XRPanel class with the default settings.

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v24.1.dll

NuGet Package: DevExpress.Reporting.Core

Declaration

public XRPanel()

Example

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.
   xrPanel.Controls.Add(xrControl); 

   return xrPanel;
}
See Also