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

XRLine.LineDirection Property

Gets or sets the line direction.

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v20.2.dll

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

Declaration

[DefaultValue(LineDirection.Horizontal)]
[SRCategory(ReportStringId.CatAppearance)]
public LineDirection LineDirection { get; set; }

Property Value

Type Default Description
LineDirection Horizontal

A LineDirection enumeration value, which determines the current line direction.

Available values:

Name Description
Slant

A line is drawn between the bottom-left and upper-right corners of the rectangle occupied by the XRLine control.

BackSlant

A line is drawn between the upper-left and bottom-right corners of the rectangle occupied by the XRLine control.

Horizontal

A line is drawn horizontally.

Vertical

A line is drawn vertically.

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