Mark Levison

Musings on No Touch Deployment, .NET development and photography

<November 2008>
SuMoTuWeThFrSa
2627282930311
2345678
9101112131415
16171819202122
23242526272829
30123456


Navigation

Other

Blogroll

Subscriptions

Post Categories



Pen.PenType HatchFill and TextureFill - explained

In VS .NET Help I complained about Pen.PenType being poorly documented. Well its time to solve that problem.

I'd assumed that PenType was settable - its not. PenType is readonly. So PenType just reflects state that's been set elsewhere. Ahahah. It turns out that Pen has constructors that take a Brush. So to get a Pen with a PenType HatchFill just create the Pen with a HatchBrush. You can even change the Pen's Brush via Pen.Brush.

Simple. In retrospect I think it would've been helpful if the documentation for Pen.PenType mention how to reach these states. Alternatively if some of sample code in the docs had used PenType - I would have found it and backtracked.

posted on Wednesday, April 21, 2004 2:57 PM by mlevison





Powered by Dot Net Junkies, by Telligent Systems