我有一个为图像宽度设置动画的情节提要。我用表情混合创建了动画:
<Storyboard x:Key="Storyboard1">
<DoubleAnimationUsingKeyFrames
Storyboard.TargetProperty="(FrameworkElement.Width)"
Storyboard.TargetName="imageFoo">
<EasingDoubleKeyFrame KeyTime="0:0:0.9" Value="335">
<EasingDoubleKeyFrame.EasingFunction>
<BackEase EasingMode="EaseOut"/>
</EasingDoubleKeyFrame.EasingFunction>
</EasingDoubleKeyFrame>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
问题是我想将该故事板分配给我的应用程序中的所有图像,而不仅仅是图像imageFoo。我想在鼠标输入图像时启动该动画。我怎样才能做到这一点?