Pens

Whereas the Brush classes are used to fill shapes, the Pen class is used to frame shapes. The interesting members are shown here:

 sealed class Pen : MarshalByRefObject, ICloneable, IDisposable { // Constructors public Pen(Brush brush); public Pen(Brush brush, float width); public Pen(Color color); public Pen(Color color, float width); // Properties public PenAlignment Alignment { get; set; } public Brush Brush { get; set; } public Color Color { get; set; } public float[] CompoundArray { get; set; } public CustomLineCap CustomEndCap { get; set; } public CustomLineCap CustomStartCap { get; set; } public DashCap DashCap { get; set; } public float DashOffset { get; set; } public float[] DashPattern { get; set; } public DashStyle DashStyle { ...

Get Windows Forms Programming in C# now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.