We can make a rotate animation with image1.RenderTransformOrigin = new Point(0.5, 0.5); so that we will make the feeling wheel is rotating. Here is the code:


DoubleAnimation da = new DoubleAnimation(360, 0, new Duration(TimeSpan.FromSeconds(3)));
RotateTransform rt = new RotateTransform();
image1.RenderTransform = rt;
image1.RenderTransformOrigin = new Point(0.5, 0.5);
da.RepeatBehavior = RepeatBehavior.Forever;
rt.BeginAnimation(RotateTransform.AngleProperty, da);

More detailed version is available at http://www.digitalmanic.com/index.php?title=Beginners_Animation_tutorial_-_Rotate_2

VN:F [1.1.6_502]
Rating: 5.0/5 (1 vote cast)
Share:
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • DotNetKicks
  • LinkedIn
  • Live
  • MySpace
  • StumbleUpon
  • Technorati

Related posts:

  1. Beginners Animation tutorial - Rotation
  2. Beginners Animation tutorial with WPF - C#
  3. WPF – Cube rotation - animation
  4. DigitalManic.com is up!
  5. Build DateTime from values