Drawing a bezier curve in silverlight XAML

We can draw a curved line by populating the Data attribute to a PathGeometry element that specifies a Path and contains a BezierSegment (from 0,50 to 100,50 with control points of 50,0 and 50,100 as the curves).

<Path Stroke="Black">
  <Path.Data>
    <PathGeometry>
      <PathFigure StartPoint="0,50">
        <BezierSegment Point1="50,0"
                       Point2="50,100"
                       Point3="100,50"/>
      </PathFigure>
    </PathGeometry>
  </Path.Data>
</Path>

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.