Click here to Skip to main content
15,029,128 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

I am using following code for an image animation(blinking).But problem is I am not able to control its blinking time.I want it such a way that one funcion will start it and another function will stop it.

if anyone has another idea or code.please share with me.


Storyboard sb = new Storyboard();
     DoubleAnimation oa = new DoubleAnimation();
     oa.Duration = new Duration(TimeSpan.FromSeconds(0.5));
     oa.From = 1;
     oa.To = 0.2;
     Storyboard.SetTarget(oa, img);
     Storyboard.SetTargetProperty(oa, new PropertyPath(Image.OpacityProperty));
     oa.AutoReverse = true;
     oa.RepeatBehavior = RepeatBehavior.Forever;
     sb.Children.Add(oa);
     sb.Begin();



Thanks.
Posted

1 solution

you can use ad-rotator or use flash software to animate image and ad it to your code
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900