0

The following code works, but the loaded gif isn't animating. It looks like the imagebrush uses the gif's first frame for displaying. I'd like to get the gif moving if it's possible.

string imagePath = $"pack://application:,,,/Resources/Images/{imageName}.gif";
return new ImageBrush()
{
    ImageSource = new BitmapImage(new Uri(imagePath)),
    TileMode = TileMode.Tile,
    ViewportUnits = BrushMappingMode.Absolute,
    Viewport = new Rect(0, 0, CELL_SIZE, CELL_SIZE),
};
Istvan Szabo
  • 13
  • 1
  • 4

0 Answers0