Back to Devexpress

XRLine.LineStyle Property

xtrareports-devexpress-dot-xtrareports-dot-ui-dot-xrline-23eeac61.md

latest3.0 KB
Original Source

XRLine.LineStyle Property

Gets or sets the style used to draw a line.

Namespace : DevExpress.XtraReports.UI

Assembly : DevExpress.XtraReports.v25.2.dll

NuGet Package : DevExpress.Reporting.Core

Declaration

csharp
[DefaultValue(DXDashStyle.Solid)]
[SRCategory(ReportStringId.CatAppearance)]
public DXDashStyle LineStyle { get; set; }
vb
<SRCategory(ReportStringId.CatAppearance)>
<DefaultValue(DXDashStyle.Solid)>
Public Property LineStyle As DXDashStyle

Property Value

TypeDefaultDescription
DXDashStyleSolid

An enumeration value that indicates the dash style.

|

Available values:

NameDescription
Solid

A solid line.

| | Dash |

A line that consists of short dashes.

| | Dot |

A line that consists of dots.

| | DashDot |

A line that consists of a repeating short dash-dot pattern.

| | DashDotDot |

A line that consists of a repeating short dash-dot-dot pattern.

| | Custom |

A user-defined dash 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.

csharp
using System.Drawing;
using System.Drawing.Drawing2D;
using DevExpress.Drawing;
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 = DXDashStyle.DashDot;

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

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

   return line;
}
vb
Imports System.Drawing
Imports System.Drawing.Drawing2D
Imports DevExpress.Drawing
Imports DevExpress.XtraReports.UI
' ...

Public Function CreateXRLine()
   ' Create an XRLine object.
   Dim Line As New XRLine()

   ' Set its color.
   Line.ForeColor = Color.Red

   ' Set its width.
   Line.LineWidth = 0.5F

   ' Set its style.
   Line.LineStyle = DXDashStyle.DashDot

   ' Set its size.
   Line.SizeF = New SizeF(300F, 100F)

   ' Set its direction.
   Line.LineDirection = LineDirection.BackSlant

   Return line
End Function

See Also

XRLine Class

XRLine Members

DevExpress.XtraReports.UI Namespace