0
如何在WinPhone中爲圖像創建動畫? 我創建了UniformGrid,它有20個圖像。如何做到以下幾點:當按下圖像 - 播放動畫?爲圖像創建動畫WinPhone
我ItemControl:
<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>
我打算使用行爲,以播放動畫:
<i:Interaction.Behaviors>
<behaviors:ImageBehavior SelectedSquareModel="{Binding}"/>
</i:Interaction.Behaviors>
請告訴我如何創建一個動畫,並將其連接到圖片?
對不起我的英文不好