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
屬性值
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 |
無 |