Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HOWTO: Paint a dotted line in .NET (WinForms)

Tags:

winforms

How can i draw a dotted line in .NET/WinForms/GDI+?

Pen p = new Pen (Color.Black) 

gives me only solid line pen.

I am trying to have a dotted (or dashed) lines; can't seem to be able to google it up successfully.

Will much appreciate any help on this one.

like image 368
gnosis Avatar asked Nov 03 '08 22:11

gnosis


1 Answers

p.DashStyle = DashStyle.Dash;

I believe.

like image 84
cfeduke Avatar answered Oct 05 '22 14:10

cfeduke