How do I get an animated gif to work in WPF?

前端 未结 18 1090
广开言路
广开言路 2020-11-22 12:16

What control type should I use - Image, MediaElement, etc.?

18条回答
  •  臣服心动
    2020-11-22 12:39

    I use this library: https://github.com/XamlAnimatedGif/WpfAnimatedGif

    First, install library into your project (using Package Manager Console):

        PM > Install-Package WpfAnimatedGif
    

    Then, use this snippet into XAML file:

        
            
                
            ...
    

    I hope helps.

    Source: https://github.com/XamlAnimatedGif/WpfAnimatedGif

提交回复
热议问题