"Frame-by-frame animation" and "playing GIF" seem to be irrelevant to the two gender, but they are not actually!
Because the image control in Silverlight does not support the direct use of GIF animation as the source, it is like the commonly used "Walking villain" and "loading Animation "... this type of typical GIF material cannot be directly used. It can only be converted to frame-by-frame animation for processing.
NASA (Silverlight MVP) provides two classic approaches:
1. Similar to the principle of film placement in old movies, it is implemented using the storyboard mechanism.
Original article: http://www.cnblogs.com/nasa/archive/2008/03/24/1119771.html
Use tools such as Photoshop and fireworks to extract materials from GIF images and splice them into a picture. Then, use a rectangle as a mask. Then, move the image to the left at a specified time.
(Meaning background positioning in CSS ):
2. Regularly fill the specified rectangle with imagebrush
Original article: http://www.cnblogs.com/nasa/archive/2009/09/11/imageBrush-Animate.html
You can also prepare the frames and use timer to switch the imagebrush of the rectangle in sequence.
3. Similar to the method principle mentioned in 2, the source attribute of the image is changed regularly.
From http://www.cnblogs.com/024hi/archive/2009/09/14/1566653.html
Here, another MVP jillzhang open-source GIF Processing library is used in the garden. With this tool class, each GIF frame is taken out to form a writeablebitmap array, then, use timer to regularly retrieve the array element in sequence as the source rotation of the image.
Good online sample http://joestegman.members.winisp.net/SL3/GIFDecoderSample/Default.html