I have numerous buttons that are created from XAML at run-time. Ideally I'd like to apply an animation to each of these buttons, the same animation for all (i.e. just a general mouse enter/leave animation).
Is it possible to create a storyboard and NOT specify a target, so that the same storyboard can be applied to multiple objects?
As the buttons are created at run-time, as far as I know, no x:name can be created for them to use as a target, and having the same storyboard for each button doesn't seem practicle.
anomaly100
Member
4 Points
5 Posts
Run-time animations
May 30, 2007 01:31 PM | LINK
Hi,
I have numerous buttons that are created from XAML at run-time. Ideally I'd like to apply an animation to each of these buttons, the same animation for all (i.e. just a general mouse enter/leave animation).
Is it possible to create a storyboard and NOT specify a target, so that the same storyboard can be applied to multiple objects?
As the buttons are created at run-time, as far as I know, no x:name can be created for them to use as a target, and having the same storyboard for each button doesn't seem practicle.
Any ideas? Any input is appreciated.
Cheers
WynApse
Star
14658 Points
343 Posts
Re: Run-time animations
May 31, 2007 06:03 PM | LINK
Hi ...
I just posted a solution to this thread: http://silverlight.net/forums/t/1553.aspx
and I believe it addresses your question as well.
If not, let me know :)
-Dave
Silverlight MVP
http://www.wynapse.com
anomaly100
Member
4 Points
5 Posts
Re: Re: Run-time animations
Jun 01, 2007 08:25 AM | LINK
That seems to be exactly what I'm looking for :-) I'll give it a go!
Cheers Dave