Tired of playing GIFs in WPF?

Repository: https://github.com/XamlAnimatedGif/WpfAnimatedGif
NuGet package: WpfAnimatedGif.
Today, I’m introducing a library for displaying animated GIF images in WPF, usable in XAML or code: WpfAnimatedGif.
Simple and easy to use: In XAML, use the AnimatedSource attached property to set the GIF you want to display (replacing the Source property):
<Window
x:Class="WpfAnimatedGif.Demo.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:gif="http://wpfanimatedgif.codeplex.com"
Title="MainWindow"
Height="350"
Width="525"
>
<Grid> <image gif:ImageBehavior.AnimatedSource="Images/animated.gif" /></Grid
></Window>

You can also specify the repeat behavior (default is 0x, which means it will use the repeat count from the GIF metadata):
<image
gif:ImageBehavior.RepeatBehavior="3x"
gif:ImageBehavior.AnimatedSource="Images/animated.gif"
/>

Of course, you can also set the GIF image in code:
var image = new BitmapImage();
image.BeginInit();
image.UriSource = new Uri(fileName);
image.EndInit();
ImageBehavior.SetAnimatedSource(img, image);

For more details on usage, see the wiki.
Features
- No new controls added; extends the native WPF
Imagecontrol with attached properties for dynamic GIF loading - Respects actual frame durations
- Allows specifying repeat behavior; if not specified, uses the repeat count from GIF metadata
- Notifies when animation playback completes, enabling specific actions after the animation ends
- Animation preview in design mode (must be explicitly enabled)
- Supports manual control of animation (pause/resume/seek)