Showing the First Frame of a MediaElement

I have an application where the user configures what video should display on the screen. When the user changes the video source I want to show a frame from the video so they can see they’ve picked the correct file. On the MediaElement in WPF there’s no ShowFirstFrame property. So on the Source change of the media element I had to do the following:

videoMedia.ScrubbingEnabled = true;
videoMedia.Stop();

 

Technorati Tags: ,