ArcSegment.RotationAngle Property

Gets or sets the amount (in degrees) by which the ellipse is rotated about the x-axis.

Namespace: System.Windows.Media
Assembly: PresentationCore (in presentationcore.dll)
XML Namespace:

public double RotationAngle { get; set; }
/** @property */
public double get_RotationAngle ()

/** @property */
public void set_RotationAngle (double value)

public function get RotationAngle () : double

public function set RotationAngle (value : double)

<object RotationAngle="double" .../>

Property Value

The amount (in degrees) by which the ellipse is rotated about the x-axis. The default value is 0.

The following illustration shows several elliptical arcs that are identical except for their RotationAngle settings.

Several ArcSegment objects with different RotationAngle settings

ArcSegments with different RotationAngle settings

Note that, if the arc's width and height are the same, setting this property has no effect.

This example shows how to draw an elliptical arc. To create an elliptical arc, use the PathGeometry, PathFigure, and ArcSegment classes.

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" />

(Note that this attribute syntax actually creates a StreamGeometry, a lighter-weight version of a PathGeometry. For more information, see the Path Markup Syntax page.)

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">
          <PathFigure StartPoint="10,100">
                <ArcSegment Size="100,50" RotationAngle="45" IsLargeArc="True" SweepDirection="CounterClockwise" Point="200,100" />

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 Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0