如何在 WinPhone 中为 Image 创建动画?我创建了 UniformGrid,它有 20 张图像。如何执行以下操作:按下图像时 - 播放动画?
我的项目控制:
<ItemsControl.ItemTemplate>
<DataTemplate>
<Image x:Name="imgSquare"
Source="{Binding Path=Square.ImagePath, Converter={StaticResource PathWP}}"
VerticalAlignment="Center"
HorizontalAlignment="Center"
Width="110"
Height="110"
Stretch="Fill">
<i:Interaction.Triggers>
<i:EventTrigger EventName="MouseLeftButtonDown">
<commandbinding:MvxEventToCommand Command="{Binding Path=DataContext.ClickCommand, ElementName=ImageList}" CommandParameter="{Binding}"/>
</i:EventTrigger>
</i:Interaction.Triggers>
<i:Interaction.Behaviors>
<behaviors:ImageBehavior SelectedSquareModel="{Binding}"/>
</i:Interaction.Behaviors>
</Image>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
我打算使用 Behavior 播放动画:
<i:Interaction.Behaviors>
<behaviors:ImageBehavior SelectedSquareModel="{Binding}"/>
</i:Interaction.Behaviors>
请告诉我如何创建动画并将其连接到图像?
对不起我的英语不好