Skip to main content
A newer version of this page is available. .

XRLine Class

A Line control.

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v19.1.dll

NuGet Packages: DevExpress.Reporting.Core, DevExpress.WindowsDesktop.Core

Declaration

[DefaultBindableProperty(null)]
public class XRLine :
    XRControl

Remarks

The XRLine control is used for drawing lines in reports. These lines can only be drawn within a specific band. To draw a line across multiple bands, use XRCrossBandLine.

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

Example

This example demonstrates how to create an XRLine object and set some of its properties.

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

public XRLine CreateXRLine() {
   // Create an XRLine object.
   XRLine line = new XRLine();

   // Set its color.
   line.ForeColor = Color.Red;

   // Set its width.
   line.LineWidth = 0.5F;

   // Set its style.
   line.LineStyle = DashStyle.DashDot;

   // Set its size.
   line.SizeF = new SizeF(300F, 100F);

   // Set its direction.
   line.LineDirection = LineDirection.BackSlant;

   return line;
}

Implements

DevExpress.XtraPrinting.IBrickOwner
DevExpress.Utils.Serializing.Helpers.IXtraSupportDeserializeCollectionItem
DevExpress.Utils.Serializing.IXtraSerializable
See Also