Compartir a través de


RotateTransform3D.CenterX Propiedad

Definición

Obtiene o establece la coordenada X de la estructura Point3D sobre la que se va a girar.

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

Valor de propiedad

Valor de tipo Double que representa la coordenada X de la estructura Point3D sobre la que se va a girar.

Ejemplos

El código siguiente usa esta propiedad para cambiar el punto alrededor del cual rotateTransform3D transforma el modelo.

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

Comentarios

Información sobre propiedades de dependencia

Campo identificador CenterXProperty
Propiedades de metadatos establecidas en true Ninguno

Se aplica a