共用方式為


BezierSegment

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Represents a cubic Bezier curve that is drawn between two points.

<BezierSegment   .../>

Managed Equivalent

BezierSegment

Remarks

To specify a Bezier type segment with more than two control points, see the PolyBezierSegment object.

For more information on basic concepts, see Geometries. Note that the Geometries topic is written primarily for users of the managed API, and may not have code examples or specific information that address the JavaScript API scenarios.

Example

The following example uses a BezierSegment as one of the PathSegment objects in a PathGeometry object.

<Canvas  
  xmlns="https://schemas.microsoft.com/winfx/2006/xaml/presentation"  
  xmlns:x="https://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>
        </PathGeometry.Figures>
      </PathGeometry>
    </Path.Data>
  </Path> 
</Canvas>

Rendered path from the example

Pathfigure