다음을 통해 공유


[Sample Of Dec 18th] How to show GIF animation in WPF

 

Homepage image
RSS Feed

Sample Download :

CS Version: https://code.msdn.microsoft.com/CSWPFAnimatedGIF-3029aeb9

VB Version: https://code.msdn.microsoft.com/VBWPFAnimatedGIF-93d061e5  

The code sample demonstrates how to implement an animated GIF image in WPF.

Note:

GIF images are deprecated in WPF due to the imperfect scaling ability.

In WPF MediaElement could show animated GIF images with some less desirable limitations:
1. The Source property must be set with absolute path;
2. Play-back functionality is not supported by default;
3. Transparent pixels display as black.

This sample is intended to show how to implement a simple and efficient animated GIF image control in case this might be a better alternative in some situations.

 

imageYou can find more code samples that demonstrate the most typical programming scenarios by using Microsoft All-In-One Code Framework Sample Browser or Sample Browser Visual Studio extension. They give you the flexibility to search samples, download samples on demand, manage the downloaded samples in a centralized place, and automatically be notified about sample updates. If it is the first time that you hear about Microsoft All-In-One Code Framework, please watch the introduction video on Microsoft Showcase, or read the introduction on our homepage https://1code.codeplex.com/.