L'animation de la hauteur et la largeur d'un objet en C#

Je suis en train d'essayer d'obtenir ces ellipses de croître, mais je ne peux pas comprendre comment démarrer l'animation. Ceci est ma première tentative à WPF animation et je n'arrive pas à comprendre comment tout cela fonctionne.

private void drawEllipseAnimation(double x, double y)
{
    StackPanel myPanel = new StackPanel();
    myPanel.Margin = new Thickness(10);

    Ellipse e = new Ellipse();
    e.Fill = Brushes.Yellow;
    e.Stroke = Brushes.Black;
    e.Height = 0;
    e.Width = 0;
    e.Opacity = .8;
    canvas2.Children.Add(e);
    Canvas.SetLeft(e, x);
    Canvas.SetTop(e, y);

    DoubleAnimation myDoubleAnimation = new DoubleAnimation();
    myDoubleAnimation.From = 0;
    myDoubleAnimation.To = 10;
    myDoubleAnimation.Duration = new Duration(TimeSpan.FromSeconds(5));
    myStoryboard = new Storyboard();
    myStoryboard.Children.Add(myDoubleAnimation);
    Storyboard.SetTargetName(myDoubleAnimation, e.Name);
    Storyboard.SetTargetProperty(myDoubleAnimation, new     PropertyPath(Ellipse.HeightProperty));
    Storyboard.SetTargetProperty(myDoubleAnimation, new PropertyPath(Ellipse.WidthProperty));
}
Pour info, ce n'est pas "C# animation", c'est "WPF animation".

OriginalL'auteur miltonjbradley | 2012-04-02