Skip to main content

RichEditPenBase.DashStyle Property

Gets or sets a line style of the RichEditPenBase object.

Namespace: DevExpress.XtraRichEdit

Assembly: DevExpress.RichEdit.v24.1.Core.dll

NuGet Packages: DevExpress.RichEdit.Core, DevExpress.Win.Navigation

Declaration

public RichEditDashStyle DashStyle { get; set; }

Property Value

Type Description
RichEditDashStyle

One of the RichEditDashStyle enumeration values.

Available values:

Name Description Example
Solid

Specifies a solid line.

dashstyle_solid

Dash

Specifies a dashed line.

dashstyle_dash

Dot

Specifies a dotted line.

dashstyle_dot

DashDot

Specifies a dash-dot line.

dashstyle_dashdot

DashDotDot

Specifies a line with a repeating dash-dot-dot pattern.

dashstyle_dashdotdot

Example

This code snippet illustrates the implementation of the PageCanvas.DrawRectangle and PageCanvas.DrawLine methods. They draw a color rectangle and two crossed lines in place of the inline pictures.

View Example

Public Overrides Sub DrawInlinePictureBox(ByVal inlinePictureBox As InlinePictureBox)
    If Form1.customDrawPicture = True Then
        Dim Ebounds As Rectangle = inlinePictureBox.Bounds
        Dim pen As New RichEditPen(Color.Maroon, 2)
        pen.DashStyle = RichEditDashStyle.Dot
        Canvas.DrawLine(pen, New Point(Ebounds.X, Ebounds.Y + Ebounds.Height), New Point(Ebounds.X + Ebounds.Width, Ebounds.Y))
        Canvas.DrawLine(pen, New Point(Ebounds.X, Ebounds.Y), New Point(Ebounds.X + Ebounds.Width, Ebounds.Y + Ebounds.Height))
        Dim inlineRect As New Rectangle(Ebounds.X, Ebounds.Y, Ebounds.Width, Ebounds.Height)
        Canvas.DrawRectangle(New RichEditPen(Color.Aquamarine, 4), inlineRect)
    Else
        MyBase.DrawInlinePictureBox(inlinePictureBox)
    End If
End Sub

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the DashStyle 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