Export (0) Print
Expand All

PolyLineSegment.Points Property

Gets or sets the collection of Point values that defines this PolyLineSegment object.

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

public PointCollection Points { get; set; }
<PolyLineSegment Points="pointSet"/>

XAML Values

pointSet

See "pointSet Grammar" in Remarks.

Property Value

Type: System.Windows.Media.PointCollection
The points that define this PolyLineSegment object.

Dependency property identifier field: PointsProperty

Lines for the PolyLineSegment are drawn from the end point of the previous segment. Otherwise, if this is the first segment, the StartPoint of the PathFigure is used as the start point. Lines are then drawn between each subsequent point specified in this collection.

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

pointSet Grammar

A valid pointSet for the Points property can describe one or more points.

X,Y[,X*,Y*]*

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.

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show:
© 2014 Microsoft