Export (0) Print
Expand All

Points Property (Polyline)

Gets or sets a collection that contains the vertex points of the Polyline.

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

Property Value


The set of points that describe the vertex points of the Polyline, 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 initial point of the object.
X*,Y* Subsequent pairs of double values that define additional vertex points 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 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, the string "0,0,50,100,100,0" would produce a "V" shaped polyline with its acute angle placed at 50,100.

A single point, such as (0,0), is a valid value, but will not render anything because you need a minimum of two points to produce a rendered output.

Applies To


See Also

Shapes and Drawing in Silverlight Overview

Community Additions

© 2014 Microsoft