Back to Devexpress

ShapeLine.DashType Property

officefileapi-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-shapeline-add9e371.md

latest5.3 KB
Original Source

ShapeLine.DashType Property

Gets or sets a dash type for a line.

Namespace : DevExpress.XtraRichEdit.API.Native

Assembly : DevExpress.RichEdit.v25.2.Core.dll

NuGet Package : DevExpress.RichEdit.Core

Declaration

csharp
LineDashType DashType { get; set; }
vb
Property DashType As LineDashType

Property Value

TypeDescription
LineDashType

An enumeration member that specifies the line dash type.

|

Available values:

Show 11 items

NameDescriptionExample
Solid

A solid line. The binary pattern is 1 (a continuous line).

|

| | Dash |

A line that consists of dashes. The binary pattern is 1111000 (four filled points and three spaces).

|

| | DashDot |

A line that consists of a repeating dash-dot pattern. The binary pattern is 11110001000 (four filled points - three spaces - one filled point - three spaces).

|

| | Dot |

A line that consists of dots. The binary pattern is 1000 (one filled point and three spaces).

|

| | LongDash |

A line that consists of long dashes. The binary pattern is 11111111000 (eight filled points and three spaces).

|

| | LongDashDot |

A line that consists of a repeating long dash-dot pattern. The binary pattern is 111111110001000 (eight filled points - three spaces - one filled point - three spaces).

|

| | LongDashDotDot |

A line that consists of a repeating long dash-dot-dot pattern. The binary pattern is 1111111100010001000 (eight filled points - three spaces - one filled point - three spaces - one filled point - three spaces).

|

| | SystemDash |

A line that consists of short dashes. The binary pattern is 1110 (three filled points and one space).

|

| | SystemDashDot |

A line that consists of a repeating short dash-dot pattern. The binary pattern is 111010 (three filled points - one space - one filled point - one space).

|

| | SystemDashDotDot |

A line that consists of a repeating short dash-dot-dot pattern. The binary pattern is 11101010 (three filled points - one space - one filled point - one space - one filled point - one space).

|

| | SystemDot |

A line that consists of dots with a short space between them. The binary pattern is 10 (one filled point and one space).

|

|

Remarks

The example below shows how to create a rectangle and change its border settings.

csharp
// Add a rectangle to a document.
Shape rectangle = document.Shapes.InsertShape(document.Range.Start, ShapeGeometryPreset.Rectangle, new RectangleF(300, 200, 500, 300));
// Fill the rectangle with color.
rectangle.Fill.SetSolidFill(Color.FromArgb(0xFF, 0xEE, 0xAD));
// Format the rectangle border.
ShapeLine border = rectangle.Line;
border.Color = Color.FromArgb(0x4D, 0x64, 0x8D);
border.Thickness = 6;
border.JoinType = LineJoinType.Miter;
border.DashType = LineDashType.Solid;
border.CompoundType = LineCompoundType.ThickThin;
vb
' Add a rectangle to a document.
Dim rectangle As Shape = document.Shapes.InsertShape(document.Range.Start, ShapeGeometryPreset.Rectangle, New RectangleF(300, 200, 500, 300))
' Fill the rectangle with color.
rectangle.Fill.SetSolidFill(Color.FromArgb(&HFF, &HEE, &HAD))
' Format the rectangle border.
Dim border As ShapeLine = rectangle.Line
border.Color = Color.FromArgb(&H4D, &H64, &H8D)
border.Thickness = 6
border.JoinType = LineJoinType.Miter
border.DashType = LineDashType.Solid
border.CompoundType = LineCompoundType.ThickThin

See Also

ShapeLine Interface

ShapeLine Members

DevExpress.XtraRichEdit.API.Native Namespace