RotateTransform.CenterX 属性

定义

获取或设置旋转中心点的 x 坐标。Gets or sets the x-coordinate of the rotation center point.

public:
 property double CenterX { double get(); void set(double value); };
public double CenterX { get; set; }
member this.CenterX : double with get, set
Public Property CenterX As Double

属性值

Double

旋转中心的 x 坐标。The x-coordinate of the center of rotation. 默认值为 0The default is 0.

注解

使用时 RotateTransform ,请注意,转换会针对特定对象( (0,0) 的点)旋转坐标系统。When you use a RotateTransform, realize that the transformation rotates the coordinate system for a particular object about the point (0, 0). 因此,根据对象的位置,它可能不会围绕中心) (就地旋转。Therefore, depending on the position of the object, it might not rotate in place (around its center). 例如,如果一个对象在 x 轴上的距离为200个单位,则旋转30度可以将对象旋转30度,旋转半径为200的圆,这是围绕原点绘制的。For example, if an object is positioned 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 the origin. 若要就地旋转对象,请将的和设置为要 CenterX CenterY 旋转的对象的 RotateTransform 中心。To rotate an object in place, set the CenterX and CenterY of the RotateTransform to the center of the object to rotate.

依赖项属性信息Dependency Property Information

标识符字段Identifier field CenterXProperty
元数据属性设置为 trueMetadata properties set to true None

适用于

另请参阅