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

XRControl Class

The base class for all visual controls used for creating reports.

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v18.2.dll

Declaration

[XRDesigner("DevExpress.XtraReports.Design.XRControlDesigner,DevExpress.XtraReports.v18.2.Extensions, Version=18.2.99.0, Culture=neutral, PublicKeyToken=c38a27d2243c2672")]
[DefaultBindableProperty("Tag")]
[DefaultCollectionName("Controls")]
[ToolboxBitmap(typeof(XRControl))]
[ToolboxSvgImage("DevExpress.XtraReports.SvgImages.Controls.XRControl.svg,DevExpress.XtraReports.v18.2.Extensions, Version=18.2.99.0, Culture=neutral, PublicKeyToken=c38a27d2243c2672")]
public class XRControl :
    Component,
    IXRSerializable,
    IEnumerable,
    IBrickOwner,
    IScriptable,
    IXtraSupportDeserializeCollectionItem,
    IXtraSerializable
<XRDesigner("DevExpress.XtraReports.Design.XRControlDesigner,DevExpress.XtraReports.v18.2.Extensions, Version=18.2.99.0, Culture=neutral, PublicKeyToken=c38a27d2243c2672")>
<DefaultBindableProperty("Tag")>
<DefaultCollectionName("Controls")>
<ToolboxBitmap(GetType(XRControl))>
<ToolboxSvgImage("DevExpress.XtraReports.SvgImages.Controls.XRControl.svg,DevExpress.XtraReports.v18.2.Extensions, Version=18.2.99.0, Culture=neutral, PublicKeyToken=c38a27d2243c2672")>
Public Class XRControl
    Inherits Component
    Implements IXRSerializable,
               IEnumerable,
               IBrickOwner,
               IScriptable,
               IXtraSupportDeserializeCollectionItem,
               IXtraSerializable

Remarks

The XRControl class implements the most basic functionality required by the report controls - objects that display and handle information in reports.

To learn more about using controls in XtraReports, refer to Adding Controls to a Report and Report Class Hierarchy.

Examples

The following example demonstrates how to create an XRControl object and set some of its properties at runtime.

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

public XRControl CreateMyXRControl() {
    // Create a control.
    XRControl xrControl1 = new XRControl();

    // Set its background color.
    xrControl1.BackColor = Color.LightGray;

    // Set its border color.
    xrControl1.BorderColor = Color.Blue;

    // Make its left and right borders visible.
    xrControl1.Borders = DevExpress.XtraPrinting.BorderSide.Left |
        DevExpress.XtraPrinting.BorderSide.Right;

    // Set its border width (in pixels).
    xrControl1.BorderWidth = 10;

    // Set its location and size (in hundredths of an inch).
    xrControl1.LocationF = new PointF(200F, 100F);
    xrControl1.SizeF = new SizeF(300F, 150F);

    return xrControl1;
}

Implements

DevExpress.XtraReports.Serialization.IXRSerializable
DevExpress.Utils.Serializing.Helpers.IXtraSupportDeserializeCollectionItem
DevExpress.Utils.Serializing.IXtraSerializable
See Also