This is my code in c# microsoft visual studio windows phone. My application is all about "SPIN THE BOTTLE", unfortunately, it spins fast but never slows down while near in stopping, it just stop then that's it. Can anyone pls. help me? How to have this app have a realistic motion of a bottle from fast to slow stopping?
Random random = new Random(); //Declare random
int randomNumber = random.Next(7201, 7560);
Duration Time_duration = new Duration(TimeSpan.FromSeconds(2));
Storyboard MyStory = new Storyboard();
MyStory.Duration = Time_duration;
DoubleAnimation My_Double = new DoubleAnimation();
My_Double.Duration = Time_duration;
MyStory.Children.Add(My_Double);
RotateTransform MyTransform = new RotateTransform();
Storyboard.SetTarget(My_Double, MyTransform);
Storyboard.SetTargetProperty(My_Double, new PropertyPath("Angle"));
My_Double.To = randomNumber;
image1.RenderTransform = MyTransform;
image1.RenderTransformOrigin = new Point(0.5, 0.5);
MyStory.Begin();