There isn't one called Pens
, that's for sure, but it's too odd not to find it. Is it really absent, or am I being blind?
(I'm just looking for a convenience class - for example, Colors.Red
and Brushes.Red
is there, but for pens the shortest appears to be new Pen(Brushes.Red, 1)
)
There is not the associated
Pens
class because aPen
is identified by both aBrush
and aThickness
rather than just one property.If you have a need for a set of standard pens (based on some thickness) then you will have to create your own. Another approach would be to create a code generator to supply the appropriate pens.
Here is an example of a class which adds a
Pen
for each defaultBrush
: