XRPanel Class

A Panel control that can contain other controls.

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v18.2.dll

Declaration

[XRToolboxSubcategory(0, 4)]
[DefaultBindableProperty(null)]
public class XRPanel :
    XRControl,
    IXRSerializable,
    IEnumerable,
    IBrickOwner,
    IScriptable,
    IXtraSupportDeserializeCollectionItem,
    IXtraSerializable
<XRToolboxSubcategory(0, 4)>
<DefaultBindableProperty(Nothing)>
Public Class XRPanel
    Inherits XRControl
    Implements IXRSerializable,
               IEnumerable,
               IBrickOwner,
               IScriptable,
               IXtraSupportDeserializeCollectionItem,
               IXtraSerializable

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.

Note

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.

Examples

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;
}

Inheritance

Object
XRControl
XRPanel

Implements

DevExpress.Utils.Serializing.Helpers.IXtraSupportDeserializeCollectionItem
DevExpress.Utils.Serializing.IXtraSerializable

See Also