Appendix F. Pens
This appendix summarizes Pens
. A Pen
defines the colors and geometry of linear features such as lines, paths, and the edges of drawn shapes like Rectangles
.
Typically Pen
properties are provided by some other object rather than the Pen
itself and determine how the object defines its Pen
.
For example, the Ellipse
control's Stroke
and StrokeThickness
properties determine how the control draws its border. The following code draws an ellipse with a red border that's 10 pixels wide:
<Ellipse Width="200" Height="100" Stroke="Red" StrokeThickness="10"/>
Table F-1 summarizes Pen
's key properties.
Table F.1. Key Properties of Pen
Property | Purpose |
---|---|
| Determines the |
| Determines the |
| Determines the shape of the ends of each dash. This can be |
| Determines how far into the first dash the line starts. |
| Determines the shape of the |
| Determines how the |
| Determines how pointy a corner can be when two segments connect as in a |
|
Get WPF Programmer's Reference: Windows Presentation Foundation with C# 2010 and .NET 4 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.