Export (0) Print
Expand All

PolyLineSegment.Points Property

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

Namespace:  System.Windows.Media
Assembly:  PresentationCore (in PresentationCore.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation

public PointCollection Points { get; set; }
    <PointCollection .../>
<object Points="PointCollection" .../>

Property Value

Type: System.Windows.Media.PointCollection
The shape of this PolyLineSegment object.

Identifier field


Metadata properties set to true


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 this collection. Lines are then drawn between each subsequent point specified in this collection.

The following example shows how to use the Points property to set the segment points of a PolyLineSegment.

PathGeometry myPathGeometry = new PathGeometry();            

// Create a figure.
PathFigure pathFigure1 = new PathFigure();
pathFigure1.StartPoint = new Point(10,50);
    new BezierSegment(
        new Point(100,0),
        new Point(200,200),
        new Point(300,100),
        true /* IsStroked */ )); 
    new LineSegment(
        new Point(400,100),
        true /* IsStroked */ ));
    new ArcSegment(
        new Point(200,100),
        new Size(50,50),
        true, /* IsLargeArc */
        true /* IsStroked */ ));

// Create another figure.
PathFigure pathFigure2 = new PathFigure();
pathFigure2.StartPoint = new Point(10,100);
Point[] polyLinePointArray = 
    new Point[]{ new Point(50, 100), new Point(50, 150)};
PolyLineSegment myPolyLineSegment = new PolyLineSegment();
myPolyLineSegment.Points = 
    new PointCollection(polyLinePointArray);
    new QuadraticBezierSegment(
        new Point(200,200),
        new Point(300,100),
        true /* IsStroked */ ));

// Display the PathGeometry. 
Path myPath = new Path();
myPath.Stroke = Brushes.Black;
myPath.StrokeThickness = 1;
myPath.Data = myPathGeometry;

.NET Framework

Supported in: 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Community Additions

© 2014 Microsoft