Polyline

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Draws a series of connected straight lines.

<Polyline   .../>

Properties

Canvas.Left, Canvas.Top, Canvas.ZIndex, Clip, Cursor, Effect (Silverlight 3), Fill (Shape), FillRule (Polyline), Grid.Column (Silverlight 2), Grid.ColumnSpan (Silverlight 2), Grid.Row (Silverlight 2), Grid.RowSpan (Silverlight 2), Height (UIElement), HorizontalAlignment (Silverlight 2), Margin (Silverlight 2), MaxHeight (Silverlight 2), MaxWidth (Silverlight 2), MinHeight (Silverlight 2), MinWidth (Silverlight 2), Name (DependencyObject), Opacity (UIElement), OpacityMask, Points (Polyline), Projection (Silverlight 3), RenderTransform, RenderTransformOrigin, Resources, Stretch (Shape), Stroke (Shape), StrokeDashArray, StrokeDashCap, StrokeDashOffset, StrokeEndLineCap, StrokeLineJoin, StrokeMiterLimit, StrokeStartLineCap, StrokeThickness, Style (Silverlight 2), Tag, Triggers, VerticalAlignment (Silverlight 2), Visibility, Width (UIElement)

Managed Equivalent

Polyline

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 object that has only one point will not render.

Example

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

<Canvas 
  xmlns="https://schemas.microsoft.com/winfx/2006/xaml/presentation" 
  xmlns:x="https://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

Reference