Export (0) Print
Expand All
Run
Expand Minimize

PolyLineSegment

Silverlight

Represents a set of line segments defined as a series of points, where each point specifies the end point of a line segment.

<PolyLineSegment   .../>

The following example creates a PathGeometry object with two PathFigure objects, each of which contains multiple PathSegment objects.

<Canvas  
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"  
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> 
  <Path Stroke="Black" StrokeThickness="1" >
    <Path.Data>
      <PathGeometry>
        <PathGeometry.Figures>
          <PathFigure StartPoint="10,50">
            <PathFigure.Segments>
              <BezierSegment
                Point1="100,0"
                Point2="200,200"
                Point3="300,100"/>
              <LineSegment Point="400,100" />
              <ArcSegment
                Size="50,50" RotationAngle="45"
                IsLargeArc="True" SweepDirection="Clockwise"
                Point="200,100"/>
            </PathFigure.Segments>
          </PathFigure>

          <PathFigure StartPoint="10,100">
            <PathFigure.Segments>
              <PolyLineSegment Points="50,100 50,150" />
              <QuadraticBezierSegment Point1="200,200" Point2="300,100"/>
            </PathFigure.Segments>
          </PathFigure>
        </PathGeometry.Figures>
      </PathGeometry>
    </Path.Data>
  </Path> 
</Canvas>

The following illustration shows the shape created by this example.

A PathGeometry with multiple figures

Drawing using polyline segments.

Community Additions

ADD
Show:
© 2014 Microsoft