4

I am using a WPF MediaElement to play a video. While the MediaElement is Paused, I set the Position to another point in the video. I would like the video image in the MediaElement to refresh to reflect the new position. But it will not update the image until I push the Play button again. Is there a way to force an MediaElement image refresh without calling its Play method?

Code example

TimeSpan tsPosition = new TimeSpan(0,0,30);   // set to 30 seconds
MediaElementObj.Position = tsPosition;
 if (PlayStatus == PAUSED) // ignore if not paused
            {
                // image refresh method call here if there is a way to do it
            }
LT Dan
  • 241
  • 4
  • 16

1 Answers1

11

Set the ScrubbingEnabled Property on the MediaElement to true.

Federico Berasategui
  • 43,562
  • 11
  • 100
  • 154