Pen.Brush Property

 

Gets or sets the Brush that determines attributes of this Pen.

Namespace:   System.Drawing
Assembly:  System.Drawing (in System.Drawing.dll)

public Brush Brush { get; set; }

Property Value

Type: System.Drawing.Brush

A Brush that determines attributes of this Pen.

Exception Condition
ArgumentException

The Brush property is set on an immutable Pen, such as those returned by the Pens class.

Assigning this property causes the pen to draw filled lines and curves. It overrides the Color property of the Pen.

.NET Framework
Available since 1.1
Return to top
Show: