RotateTransform3D.CenterX Eigenschaft

Definition

Dient zum Abrufen oder Festlegen der X-Koordinate der Point3D Drehung.

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

Eigenschaftswert

Double that represents the X coordinate of the Point3D about which to rotate.

Beispiele

Der folgende Code verwendet diese Eigenschaft, um den Punkt zu ändern, an dem ein RotateTransform3D das Modell transformiert.

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

Hinweise

Informationen zur Abhängigkeitseigenschaft

Element Wert
Bezeichnerfeld CenterXProperty
Auf Metadateneigenschaften festgelegt true Nichts

Gilt für: