RotateTransform3D.CenterX Proprietà

Definizione

Ottiene o imposta la coordinata X dell'oggetto Point3D su cui ruotare.

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

Valore della proprietà

Double che rappresenta la coordinata X dell'oggetto Point3D su cui ruotare.

Esempio

Il codice seguente usa questa proprietà per modificare il punto intorno al quale un oggetto RotateTransform3D trasforma il modello.

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

Commenti

Informazioni sulle proprietà di dipendenza

Item Value
Campo Identificatore CenterXProperty
Proprietà dei metadati impostate su true Nessuno

Si applica a