DoubleAnimation dy = new DoubleAnimation
{
From = from * element.ActualHeight,
To = to * element.ActualHeight,
Duration = TimeSpan.FromSeconds(0.3)
};
Storyboard.SetTarget(dy, element);
Storyboard.SetTargetProperty(dy, new PropertyPath(FrameworkElement.HeightProperty));
Storyboard sb = new Storyboard();
sb.Children.Add(da);
sb.Begin();
Friday, July 10, 2009
Minimum Code for Silverlight Animation
Let's change the height of an element.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment