StreamGeometryContext.PolyLineTo Method (IList<Point>, Boolean, Boolean)


Draws one or more connected straight lines.

Namespace:   System.Windows.Media
Assembly:  PresentationCore (in PresentationCore.dll)

public abstract void PolyLineTo(
	IList<Point> points,
	bool isStroked,
	bool isSmoothJoin


Type: System.Collections.Generic.IList<Point>

The collection of points that specify destination points for one or more connected straight lines.

Type: System.Boolean

true to make the segment stroked when a Pen is used to render the segment; otherwise, false.

Type: System.Boolean

true to treat the join between this segment and the previous segment as a corner when stroked with a Pen; otherwise, false.

Exception Condition

An attempt was made to add a segment without starting a figure by calling the BeginFigure method.

This method uses the end point of the previous segment as its starting point. If this is the first segment in a figure, it uses the point specified by the BeginFigure method as its start point.

A StreamGeometry cannot be serialized if it contains a Transform or any non-stroked or unfilled segments.

Legacy Code Example

The following example shows how to draw a triangle using the PolyLineTo method.

Code snippet is not found. Confirm that the code snippet name 'GeometriesMiscSnippets_procedural_snip' is correct.

.NET Framework
Available since 3.0
Return to top
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2015 Microsoft