1
所以作为一个简单的例子,如果你有一个像下面那个动态创建它的内容的ItemsControl我怎么可以添加触发器,以便每个项目动画和有一个BeginTime基于它的索引在名单。按顺序动画ItemsControl中的项目
我试过扩展按钮,使其包含延迟时间,然后绑定按钮ControlTemplate的触发器中包含的动画的BeginTime,由于动画是可冻结的,因此存在问题。
如何在ItemsControl本身或单个项目上创建一个Storyboard,逐个显示每个项目。
任何想法?
起点为我的标记:
<Window.Resources>
<ResourceDictionary >
<Collections:ArrayList x:Key="ItemsList">
<System:String>OPTIONS</System:String>
<System:String>STICKERS</System:String>
<System:String>STYLING</System:String>
<System:String>WHEELS</System:String>
<System:String>INTERIOR</System:String>
<System:String>ROOF</System:String>
<System:String>COLOURS</System:String>
<System:String>VERSION</System:String>
</Collections:ArrayList>
</ResourceDictionary>
</Window.Resources>
<Grid>
<ListView ItemsSource="{StaticResource ItemsList}">
<ListView.Style>
<Style>
<Setter Property="ListView.ItemTemplate">
<Setter.Value>
<DataTemplate>
<Button Content="{Binding}" />
</DataTemplate>
</Setter.Value>
</Setter>
</Style>
</ListView.Style>
</ListView>
</Grid>
干杯 Ĵ
是的。我有这样的事情,但我不喜欢动画无法通过资源进行更改和维护的事实。 – 2009-06-17 08:29:40