Export (0) Print
Expand All

PolyBezierSegment Object

Represents one or more cubic Bezier curves.

XAML
<PolyBezierSegment .../>
Scripting
To create an object using scripting, see the CreateFromXAML method.

Properties

Name, Points

Methods

Equals, FindName, GetHost, GetValue, SetValue

Remarks

A BezierSegment can have two control points, and an end point. A PolyBezierSegment can have an essentially unlimited number of control points, with the values of these points and the end point given as the Points property value. Individual points are parsed out of the Points string.

Examples

The following example shows how to use a PolyBezierSegment to create a series of curves.

XAML
<Canvas
  xmlns="http://schemas.microsoft.com/client/2007"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  Width="500" Height="100">
      <Path Stroke="Black" StrokeThickness="1">
        <Path.Data>
          <PathGeometry>
            <PathGeometry.Figures>
              <PathFigureCollection>

                <!-- The StartPoint specifies the starting point of the first curve. -->
                <PathFigure StartPoint="10,100">
                  <PathFigure.Segments>
                    <PathSegmentCollection>

                      <!-- The PolyBezierSegment specifies two cubic Bezier curves.
                           The first curve is from 10,100 (start point specified above)
                           to 300,100 with a control point of 0,0 and another control
                           point of 200,0. The second curve is from 300,100 
                           (end of the last curve) to 600,100 with a control point of 300,0
                           and another control point of 400,0. -->
                      <PolyBezierSegment Points="0,0 200,0 300,100 300,0 400,0 600,100" />
                    </PathSegmentCollection>
                  </PathFigure.Segments>
                </PathFigure>
              </PathFigureCollection>
            </PathGeometry.Figures>
          </PathGeometry>
        </Path.Data>
      </Path>
</Canvas>

See Also

Silverlight Geometries Overview
PathFigure
PathSegment

Community Additions

Show:
© 2014 Microsoft