如何制作动画 .gif 以动画 WPF 用户控件中的每一帧?此处的 .gif 仅显示第一帧。
<UserControl.Triggers>
<EventTrigger RoutedEvent="Button.Click" SourceName="btnPressQ">
<EventTrigger.Actions>
<BeginStoryboard Storyboard="{StaticResource sbdShowAlfa}"/>
</EventTrigger.Actions>
</EventTrigger>
</UserControl.Triggers>
<Button Grid.Column="2" Command="{Binding Path=PressAndRelease}" CommandParameter="Q" Style="{StaticResource TransparentButton}">
<Button.Template>
<ControlTemplate TargetType="{x:Type Button}">
<Grid>
<Image Name="imgNormalQ" Source="/Wosk;component/Images/Alphaberts/Q1.png" Height="127" />
<Image Name="imgPressedQ" Source="/Wosk;component/Images/Alphaberts/DancingPeaks.gif" Height="262" Width="119" Margin="-23,-136,-21,0" Visibility="Hidden"/>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Panel.ZIndex" Value="999"/>
<Setter TargetName="imgPressedQ" Property="Visibility" Value="Visible"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Button.Template>
</Button>