I'm trying to animate the position of a button that is a child of a Canvas control. Run I run my app, though, the control doesn't move. Here is the code I'm trying:
Any ideas? Is there something wrong with my code? Should I be writing it a different way?
Thanks,
--Jeremy
Code Snippet
DoubleAnimation buttonAnimation = new DoubleAnimation();
buttonAnimation.From = currentYValue;
buttonAnimation.To = newYValue;
buttonAnimation.Duration = new Duration(TimeSpan.FromSeconds(1));
myButton.BeginAnimation(Canvas.TopProperty, buttonAnimation);
Any ideas? Is there something wrong with my code? Should I be writing it a different way?
Thanks,
--Jeremy