【发布时间】:2010-10-08 14:30:18
【问题描述】:
我制作了一个简单的故事板,它采用特定的 ListBoxItem 并让它增长 1.3 倍。我想将此动画添加到我动态创建的每个 ListBoxItem 中,以便在鼠标悬停时激活它,但情节提要似乎被硬编码为第一个项目:
<Storyboard x:Name="ListItem_MouseEntered">
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="RecentNews" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
<SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1.3"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="RecentNews" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
<SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1.3"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
我应该如何复制这个故事板并将目标设置为每个列表框项?
干杯
尼克
PS,我相信我在动画中有一些错误,别担心,这不是我的问题的一部分 :-)
【问题讨论】:
标签: silverlight animation