Export (0) Print
Expand All

PlaneProjection.CenterOfRotationY Property

July 28, 2014

Gets or sets the y-coordinate of the center of rotation of the object you rotate.

Namespace:  System.Windows.Media
Assembly:  System.Windows (in System.Windows.dll)
XMLNS for XAML: Not mapped to an xmlns.

public double CenterOfRotationY { get; set; }
<PlaneProjection CenterOfRotationY="double"/>

Property Value

Type: System.Double
The y-coordinate of the center of rotation of the object you rotate. Typical values are between 0 and 1 with a value of 0 corresponding to one edge of the object and 1 to the opposite edge. Values outside this range are allowed and move the center of rotation accordingly. The default is 0.5 (the center of object).

Dependency property identifier field: CenterOfRotationYProperty

You can move the center of rotation by using the CenterOfRotationX, CenterOfRotationY, and CenterOfRotationZ properties. By default, the axes of rotation run directly through the center of the object, causing the object to rotate around its center; however, if you move the center of rotation to the outer edge of the object, it will rotate around that edge. The default values for CenterOfRotationX and CenterOfRotationY are 0.5, and the default value for CenterOfRotationZ is 0. For CenterOfRotationX and CenterOfRotationY, values between 0 and 1 set the pivot line at some location within the object. A value of 0 denotes one object edge and 1 denotes the opposite edge. Values outside of this range are allowed and will move the center of rotation accordingly. Because the z-axis of the center of rotation is drawn through the plane of the object, you can move the center of rotation behind the object using a negative number and above the object (toward you) using a positive number.

CenterOfRotationX moves the center of rotation along the x-axis parallel to the object while CenterOfRotationY moves the center or rotation along the y-axis of the object. The following illustrations demonstrate using different values for CenterOfRotationY.

CenterOfRotationY = "0.5" (default)

Rotate around X-axis

CenterOfRotationY = "0.1" (upper edge)

CenterOfRotationY value of 0.1.

Notice how the image rotates around the center when the CenterOfRotationY property is set to the default value of 0.5 and rotates near the upper edge when set to 0.1. You see similar behavior when changing the CenterOfRotationX property to move where the RotationY property rotates the object.

CenterOfRotationX = "0.5" (default)

Rotate around the Y-axis.

CenterOfRotationX = "0.9" (right-hand edge)

CenterOfRotationX value of 0.9.

You use the CenterOfRotationZ to place the center of rotation above or below the plane of the object. This allows you to rotate the object around the point like a planet orbits around a star.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2014 Microsoft