RotateTransform3D.CenterX 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取或设置旋转时所围绕的 Point3D 的 X 坐标。
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
属性值
双精度值,表示旋转时所围绕的 Point3D 的 X 坐标。
示例
下面的代码使用此属性更改 RotateTransform3D 转换模型的点。
public void AddAnimation(object sender, EventArgs e)
{
if ((bool)CenterAnimCheck.IsChecked)
{
//Shift point around which model rotates to (-0.5, -0.5, -0.5).
myHorizontalRTransform.CenterX = -0.5;
myHorizontalRTransform.CenterY = -0.5;
myHorizontalRTransform.CenterZ = -0.5;
}
if (!(bool)CenterAnimCheck.IsChecked)
{
//Set point around which model rotates back to (0, 0, 0).
myHorizontalRTransform.CenterX = 0;
myHorizontalRTransform.CenterY = 0;
myHorizontalRTransform.CenterZ = 0;
}
}
Public Sub AddAnimation(ByVal sender As Object, ByVal e As EventArgs)
If CBool(CenterAnimCheck.IsChecked) = True Then
'Shift point around which model rotates to (-0.5, -0.5, -0.5).
myHorizontalRTransform.CenterX = -0.5
myHorizontalRTransform.CenterY = -0.5
myHorizontalRTransform.CenterZ = -0.5
End If
If CBool(CenterAnimCheck.IsChecked) <> True Then
'Set point around which model rotates back to (0, 0, 0).
myHorizontalRTransform.CenterX = 0
myHorizontalRTransform.CenterY = 0
myHorizontalRTransform.CenterZ = 0
End If
End Sub
注解
依赖项属性信息
标识符字段 | CenterXProperty |
元数据属性设置为 true |
无 |