O'Reilly logo

Microsoft® Silverlight® Edition: Programming Windows® Phone 7 by Charles Petzold

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Polygon and Fill

The Polyline that I’ve been using to demonstrate dotted lines is only three sides of a square:

<Grid Background="LightCyan">
    <Polyline Points="100 100, 380 100,
                      380 380, 100 380"
              Stroke="Red"
              StrokeThickness="20"
              StrokeStartLineCap="Round"
              StrokeEndLineCap="Round"
              StrokeLineJoin="Round"
              StrokeDashArray="0 2"
              StrokeDashCap="Round" />
</Grid>
image with no caption

But if you set the Fill brush, the interior is filled as if the polyline describes a closed area:

<Grid Background="LightCyan"> <Polyline Points="100 100, 380 100, 380 380, 100 380" Stroke="Red" StrokeThickness="20" Fill="Blue" StrokeStartLineCap="Round" StrokeEndLineCap="Round" StrokeLineJoin="Round" ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required