Tag Archives: DashStyle

Draw lines with custom dash patterns in C#

To create lines with custom dash patterns, first create a Pen object and set its DashStyle property to Custom. Then set its DashPattern property to an array of floating point numbers that indicate how many units to draw and then … Continue reading

Posted in drawing, graphics | Tagged , , , , , , , , , , , , | 1 Comment

Draw dashed lines with different dash cap styles in C#

A dash cap determines how the program draws the ends of the dots and dashes that make up a dashed line. If the line is 1 pixel wide, you probably won’t notice any difference, but dash caps are easy to … Continue reading

Posted in drawing, graphics | Tagged , , , , , , , , , , , | 3 Comments

Draw dashed lines with different styles in C#

To draw dashed lines, create a new Pen and set its DashStyle property to indicate the dash style you want. For example, the following code draws two dashed lines, one with the style Dash and one with the style DashDot. … Continue reading

Posted in drawing, graphics | Tagged , , , , , , , , , | Leave a comment