Assembly: PresentationCore (in presentationcore.dll)
XML Namespace: http://schemas.microsoft.com/winfx/2006/xaml/presentation
/** @property */ public SweepDirection get_SweepDirection () /** @property */ public void set_SweepDirection (SweepDirection value)
public function get SweepDirection () : SweepDirection public function set SweepDirection (value : SweepDirection)
Property ValueA value that specifies the direction in which the arc is drawn. The default value is Counterclockwise.
For an ArcSegment with a given Size, RotationAngle, start point, and end Point, four different arcs are possible. Specifying the IsLargeArc property reduces the number of possible arcs to two: an arc drawn from the start point to the end Point in a Clockwise direction and an arc drawn from the start point to the end point in a Counterclockwise direction.
The following illustration shows two elliptical arcs that are identical except for their SweepDirection settings.
ArcSegment objects with different SweepDirection settings
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.
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.
Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter EditionThe Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.