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

XRLine.LineStyle Property

Gets or sets the style used to draw a line.

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v19.1.dll

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

Declaration

[DefaultValue(DashStyle.Solid)]
[SRCategory(ReportStringId.CatAppearance)]
public DashStyle LineStyle { get; set; }

Property Value

Type Default Description
DashStyle **Solid**

A DashStyle enumeration value that represents the line style.

Remarks

Use the LineStyle property to specify whether the XRLine control should be drawn solid or dashed.

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

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the LineStyle property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also