次の構造のリストボックスがあります。データは正常に表示され、問題はありません。StackPanel のアニメーション効果を取得したいのですが、DataTemplate 内にあるため、Blend を使用して目的のアニメーション効果を得ることができません。
そのためのイベント ハンドラーとコードを記述できると思いますが、ListBox アイテムのアニメーションを実現する最善の方法はありますか?
<ListBox Height="600" ItemsSource="{StaticResource learn}">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Height="100" Orientation="Horizontal">
<TextBlock Width="0" Text="{Binding ID}" />
<Image Height="100" Width="100"/>
<StackPanel Orientation="Vertical" Width="319" VerticalAlignment="Center">
<TextBlock TextWrapping="Wrap" Text="{Binding Text}" Margin="6,0,0,0" FontSize="29.333" />
<TextBlock TextWrapping="Wrap" Text="{Binding Description}" Margin="6,0,0,0" FontSize="16"/>
</StackPanel>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>