zhaolili

第一种方法:使用winform插件

<WindowsFormsHost  xmlns:wf="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms" Grid.Column="0"  >
     <wf:PictureBox ImageLocation="load1.gif" SizeMode="StretchImage"/>
 </WindowsFormsHost>

第二种方法:使用wpf自身的动态图

xaml 标签

 <MediaElement LoadedBehavior="Play" Stretch="Fill" Source="load1.gif" MediaEnded="MediaElement_MediaEnded" Grid.Column="1" />

必须追加事件
private void MediaElement_MediaEnded(object sender, RoutedEventArgs e)
{
      ((MediaElement)sender).Position = ((MediaElement)sender).Position.Add(TimeSpan.FromMilliseconds(1));
}

 

分类:

技术点:

相关文章:

  • 2021-12-22
  • 2022-12-23
  • 2021-11-15
  • 2022-12-23
  • 2021-03-28
  • 2022-12-23
  • 2022-12-23
  • 2021-07-06
猜你喜欢
  • 2021-11-07
  • 2022-12-23
  • 2021-12-24
  • 2021-10-03
  • 2021-11-19
  • 2022-12-23
  • 2021-10-25
相关资源
相似解决方案