Skip to main content

XRControl.Borders Property

Specifies a set of borders (top, right, bottom, left) that should be visible for the control.

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v22.2.dll

NuGet Package: DevExpress.Reporting.Core


public virtual BorderSide Borders { get; set; }

Property Value

Type Description

A BorderSide enumeration value or combination of values, specifying a set of visible borders.

Available values:

Name Description

No borders are applied to a brick.


Applies the left border to a brick.


Applies the top border to a brick.


Applies the right border to a brick.


Applies the bottom border to a brick.


Applies all borders to a brick.


The Borders property specifies which borders of the control should be visible, while the border color is specified by the XRControl.BorderColor property, and its width is specified by the XRControl.BorderWidth property. Note that if the XRControl.BorderWidth property is set to 0, the control’s borders become invisible.

If the Borders property’s value is not set for the current report control, its value is obtained from its parent, or a parent of its parent and so on. Similarly, the Borders value of the current control is applied to all its child report controls (if there are any in its XRControl.Controls collection), if their Borders property value is not set. For more information on this concept, please refer to Appearance Properties.


The Borders property is used only by some descendants of the XRControl class. For example, the XRPageBreak class ignores the Borders property.


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 |

    // 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;
See Also