CenterY Property (RotateTransform)

Gets or sets the y-coordinate of the rotation center point.

XAML
<object CenterY="Double" .../>
Scripting
value = object.CenterY
object.CenterY = value

Property Value

Double

The y-coordinate of the center of rotation.

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

Remarks

The local 0,0 for an object can be offset on a Canvas using Canvas.Left and Canvas.Top, but this does not count as a transform; the object retains its own local 0,0 in this case for transform purposes. For details on this concept, see Object Layout in Silverlight.

When you use a RotateTransform, using 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.

Applies To

RotateTransform

See Also

Silverlight Transforms Overview
Object Layout in Silverlight