How a continuous play .gif file in WPF

后端 未结 1 1886
一整个雨季
一整个雨季 2021-01-20 13:21

I have a file format gif I put it in mediaelement, animation worked, but how to make that file was played continuously

1条回答
  •  面向向阳花
    2021-01-20 14:05

    You can use a MediaTimeline element to make the animation loop forever:

    
        
            
                
                    
                        
                            
                        
                    
                
            
        
    
    

    EDIT: The solution above does not seem to be working with GIF files whose size exceeds a few kilobytes. The issue apparently come from Windows Media Player (it can be reproduced with WMP itself). So, YMMV.

    0 讨论(0)
提交回复
热议问题