AngleProperty Field
Collapse the table of content
Expand the table of content

AxisAngleRotation3D.AngleProperty Field

 

Identifies the Angle dependency property.

Namespace:   System.Windows.Media.Media3D
Assembly:  PresentationCore (in PresentationCore.dll)

public static readonly DependencyProperty AngleProperty

Field Value

Type: System.Windows.DependencyProperty

The identifier for the Angle dependency property.

The following code excerpt uses this property as the target of an animation.

//Define a transformation
RotateTransform3D myRotateTransform = new RotateTransform3D(new AxisAngleRotation3D(new Vector3D(0, 2, 0), 1));
//Define an animation for the transformation
DoubleAnimation myAnimation = new DoubleAnimation();
myAnimation.From = 1;
myAnimation.To = 361;
myAnimation.Duration = new Duration(TimeSpan.FromMilliseconds(5000));
myAnimation.RepeatBehavior = RepeatBehavior.Forever;
//Add animation to the transformation
myRotateTransform.Rotation.BeginAnimation(AxisAngleRotation3D.AngleProperty, myAnimation);

//Add transformation to the model
teapotModel.Transform = myRotateTransform;

.NET Framework
Available since 3.0
Return to top
Show:
© 2016 Microsoft