views:

30

answers:

0

hello friends ,

i have a problem a i m new in silver light .i wants to move my images i have did this in Wpf

but the same code is not running in this i m using the dependency chain for this..below is my code example..

please help me out how can i achieve it.

Thanks In advance

shashank

 private void MoveImageimgMid()
    {
        ScaleTransform st = new ScaleTransform();
        st.ScaleX = 1;
        st.ScaleY = 1;
        DoubleAnimation TopAnimation = new DoubleAnimation();
        TopAnimation.From = 0.0;
        TopAnimation.To = 1.0;
        TopAnimation.Duration = TimeSpan.FromMilliseconds(500);
        Storyboard myAnimatedImageStoryboard = new Storyboard();
        imgMid.RenderTransform = st;
        DependencyProperty[] propertyChain = new DependencyProperty[] { System.Windows.Controls.Image.RenderTransformProperty, TransformGroup.ChildrenProperty, ScaleTransform.ScaleXProperty };
        //string thePath = "(0).(2)";
        //PropertyPath myPropertyPath = new PropertyPath(thePath, propertyChain);
        //Storyboard.SetTargetProperty(TopAnimation, myPropertyPath);
        Storyboard.SetTarget(TopAnimation, imgMid);

        myAnimatedImageStoryboard.Children.Add(TopAnimation);

        myAnimatedImageStoryboard.Begin();
    }