How to: Create an Elliptical Arc
In the following examples, an elliptical arc is drawn from (10,100) to (200,100). The arc has a Size of 100 by 50 device-independent pixels, a RotationAngle of 45 degrees, an IsLargeArc setting of
true, and a SweepDirection of Counterclockwise.
In Extensible Application Markup Language (XAML), you can use attribute syntax to describe a path.
<Path Stroke="Black" StrokeThickness="1" Data="M 10,100 A 100,50 45 1 0 200,100" />
In XAML, you can also draw an elliptical arc by explicitly using object tags. The following is equivalent to the preceding XAML markup.
<Path Stroke="Black" StrokeThickness="1"> <Path.Data> <PathGeometry> <PathGeometry.Figures> <PathFigureCollection> <PathFigure StartPoint="10,100"> <PathFigure.Segments> <PathSegmentCollection> <ArcSegment Size="100,50" RotationAngle="45" IsLargeArc="True" SweepDirection="CounterClockwise" Point="200,100" /> </PathSegmentCollection> </PathFigure.Segments> </PathFigure> </PathFigureCollection> </PathGeometry.Figures> </PathGeometry> </Path.Data> </Path>
This example is part of a larger sample. For the complete sample, see the Geometries Sample.
We'd love to hear your thoughts. Choose the type you'd like to provide:
Our feedback system is built on GitHub Issues. Read more on our blog.