XamlAnimatedGif / WpfAnimatedGif

A simple library to display animated GIF images in WPF, usable in XAML or in code.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problem with animated gif in an adorner

steve-mckinney opened this issue · comments

I've written a simple adorner for the purpose of displaying an animated 'spinner' gif. The adorner (based on Josh Smith's UIElementAdorner) contains a single child Image control; I set the source using ImageBehavior.SetAnimatedSource(). I create a single instance of the adorner, show it by adding it to the adorned element's adorner layer, and hide it by removing it from the adorned element's adorner layer.

My 'spinner' works great the first time I show it. However when I hide it and show it again, the 'spinner' gif is no longer animated. Any thoughts as to why this might be?

I haven't tried it yet, but I suspect the problem is that the Image control is not reloaded, so I don't detect that the animation should be run again... I'll have a look when I can.

I think it was related to #9, can you check if it works as expected now?