MSDN Library

Polyline Object

Draws a series of connected straight lines.

XAML
<Polyline .../>
Scripting
To create an object using scripting, see CreateFromXAML.

Remarks

This object is similar to the Polygon object, except that this object does not need to be a closed shape. You could achieve the same visual result by overlapping multiple Line objects.

A Polyline with only one point will not render.

Examples

The following example shows how to use a PolyLine to create a closed triangle.

XAML
<Canvas 
  xmlns="http://schemas.microsoft.com/client/2007" 
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">  
                   
  <Polyline Points="50,25 0,100 100,100 50,25"
    Stroke="Blue" StrokeThickness="10"
    Canvas.Left="75" Canvas.Top="50" />

</Canvas>

See Also

Shapes Overview
Shape

Community Additions

Show:
© 2016 Microsoft