views:

477

answers:

1

I want to play gif recurrsivley file using MediaElement. Is there any inbuild property like (repeat or any other) to play files non stop ?

I have played in repeat mode using following code.

objMediaPlayer.Source=new System.Uri("XXX.gif");

objMediaPlayer.LoadedBehavior= MediaState.Manual;

objMediaPlayer.MediaEnded+=new RoutedEventHandler(previewPlayer_MediaEnded);

void previewPlayer_MediaEnded(object sender, RoutedEventArgs e) {

            objMediaPlayer.Position = TimeSpan.Zero;
           objMediaPlayer.Play();

 }

);

It working for the video file but not for gif, i m missing some thing or i have to do some thing extra for giff.

A: 

I found that there is problem in MediaElement with gif playing.for further references Look here

Firoz