RotateTransform3D.CenterY 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定要做為旋轉中心之 Point3D 的 Y 座標。
public:
property double CenterY { double get(); void set(double value); };
public double CenterY { get; set; }
member this.CenterY : double with get, set
Public Property CenterY As Double
屬性值
Double,表示要做為旋轉中心之 Point3D 的 Y 座標。
範例
下列程式碼會使用這個屬性來變更 RotateTransform3D 轉換模型的點。
public void AddAnimation(object sender, EventArgs e)
{
if ((bool)CenterAnimCheck.IsChecked == true)
{
//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 != true)
{
//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
備註
相依性屬性資訊
識別碼欄位 | CenterYProperty |
中繼資料屬性設定為 true |
無 |