RotateTransform3D.CenterX Property

Definition

Gets or sets the X coordinate of the Point3D about which to rotate.

C#
public double CenterX { get; set; }

Property Value

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

Examples

The following code uses this property to change the point around which a RotateTransform3D transforms the model.

C#
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;
    }
}

Remarks

Dependency Property Information

Item Value
Identifier field CenterXProperty
Metadata properties set to true None

Applies to

Product Versions
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10