Share via


Angle

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

Gets or sets the angle of rotation, in degrees, for this transform.

<object Angle="Double"  .../>
value = object.Angle
object.Angle = value

Property Value

Type: Double

The angle, in degrees, of rotation.

This property is read/write. The default value is 0.

Managed Equivalent

Angle

Remarks

You can offset the local 0,0 for an object on a Canvas by using Canvas.Left and Canvas.Top, but this does not count as a transform. In this case, the object retains its own local 0,0 for transform purposes.

When you use a RotateTransform and use the default values of 0 for CenterX and CenterY, the transform rotates the coordinate system for a particular object around its local 0,0. Therefore, depending on the position of the object and other applied transforms, it might not rotate in place (around its center). For example, if an object is already transformed 200 units from 0 along the x-axis, a rotation of 30 degrees can swing the object 30 degrees along a circle that has a radius of 200, which is drawn around its local 0,0. To rotate an object in place, set the CenterX and CenterY of the RotateTransform to the center of the object to rotate.

This property accepts negative values. Positive values are interpreted as clockwise rotation. Negative values are interpreted as counterclockwise rotation.

Applies To

RotateTransform