L'application d'animation ScaleTransform au problème de code

Je suis à essayer de savoir pourquoi le code ci-dessous ne semble pas fonctionner. Il ne donne pas une erreur - il n'a tout simplement pas de l'échelle. Il fait ne semble pas fonctionner si je l'ai changer pour mon deuxième exemple de code.
Quelqu'un a une idée?

Grâce

public static void StartMouseEnterAnimation(Button button)
    {
        Storyboard storyboard = new Storyboard();

        ScaleTransform scale = new ScaleTransform(1.0, 1.0, 1, 1);
        button.RenderTransformOrigin = new Point(0.5, 0.5);
        button.RenderTransform = scale;

        DoubleAnimation growAnimation = new DoubleAnimation();
        growAnimation.Duration = TimeSpan.FromMilliseconds(300);
        growAnimation.From = 1;
        growAnimation.To = 1.8;
        storyboard.Children.Add(growAnimation);

        Storyboard.SetTargetProperty(growAnimation, new PropertyPath(ScaleTransform.ScaleXProperty));
        Storyboard.SetTarget(growAnimation, scale);

        storyboard.Begin();
    }

--- Ci-dessous NE fonctionne pas mais j'ai dû créer un TransformGroup de référence et ce à travers une plus compliqué PropertyChain...

public static void StartMouseEnterAnimation(Button button)
    {    
        Storyboard storyboard = new Storyboard();            
        ScaleTransform scale = new ScaleTransform(1.0, 1.0, 1, 1);
        button.RenderTransformOrigin = new Point(0.5, 0.5);
        TransformGroup myTransGroup = new TransformGroup();
        myTransGroup.Children.Add(scale);
        button.RenderTransform = myTransGroup;

        DoubleAnimation growAnimation = new DoubleAnimation();
        growAnimation.Duration = TimeSpan.FromMilliseconds(100);
        //growAnimation.From = 1;
        growAnimation.To = 1.1;
        storyboard.Children.Add(growAnimation);

        DependencyProperty[] propertyChain = new DependencyProperty[]
        {
            Button.RenderTransformProperty, 
            TransformGroup.ChildrenProperty,
            ScaleTransform.ScaleXProperty
        };
        string thePath = "(0).(1)[0].(2)";
        PropertyPath myPropertyPath = new PropertyPath(thePath, propertyChain);
        Storyboard.SetTargetProperty(growAnimation, myPropertyPath);
        Storyboard.SetTarget(growAnimation, button);

        storyboard.Begin();
   }

OriginalL'auteur Marcel | 2010-01-25