Points Property (PolyLineSegment)

Gets or sets the set of points that defines this PolyLineSegment object.

<object Points="pointSet" .../>
object.Points = "pointSet"

Property Value


The set of points that define this PolyLineSegment object, as a delimited string that represents a point set. See pointSet Grammar section.

This property is write-only.

pointSet Grammar

X, Y A pair of double values that identify the x,y end point of the first segment.
X*,Y* Subsequent pairs of double values that define the end points of additional segments of this object.
  • The [] characters are not literals, they are indicators of optional values. The * indicates that any number of points is permitted past the initial X,Y.
  • The separator in this grammar can be either a space or a comma. You can use a mixture of space and comma as separators. The common convention is to use commas between the X and Y and spaces between the points.
  • Any odd number of double values in a Points value / set of points is illegal and will throw either a parser or runtime error. The number of double values in the string must always be even so that it evaluates as x,y pairs that define a point.


A line is drawn from the end point of the previous segment or, if this is the first segment, from the StartPoint of the PathFigure to the first point in the set of points. Lines are then drawn between each subsequent point.

A set of points is defined through a string syntax, enabled by an underlying type converter. There is no object available in the object model for accessing the set of points as a collection. In either script or XAML, Points is write-only; attempting to get the value in script will result in a runtime GetValue error. You set the value by specifying a string. Without a collection object, there is no means in the object model to obtain a count, although you could parse the string yourself and count separators or otherwise get a count before you pass the string as input.

As an example of the PointSet grammar, a StartPoint of 0,0 and the string "50,100,100,0" for PolyLineSegment.Points would produce a "V" shaped polyline segment with its acute angle placed at 50,100.

Applies To


See Also

Path Markup Syntax

Community Additions