Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

One method to apply a single animation to multiple controls in Silverlight is to use the "Storyboard.TargetName" property in XAML. This property allows you to specify multiple control names, separated by commas, as the targets for the same animation. For example:

<storyboard x:name="myStoryboard"> <doubleanimation from="0" to="1" duration="0:0:1" storyboard.targetname="myControl1, myControl2, myControl3" storyboard.targetproperty="Opacity"/> </storyboard>

In this example, the "myStoryboard" animation will change the opacity of the controls named "myControl1", "myControl2", and "myControl3" from 0 to 1 over one second.