Show first frame of video in WPF MediaElement

Viewed 16803

I have a WPF-application with a MediaElement which I use to run a video. I don't want the video to autoplay when loaded, so I set the LoadedBehavior to Manual.

<MediaElement LoadedBehavior="Manual" 
              Source="foo.wmv" 
              MediaOpened="videoElement_MediaOpened" />

However; I want the element to show the first frame of the video when loaded. Is there any magic way of doing this?

3 Answers

You don't have to create an event, see following

<MediaElement Source="foo.wmv" 
              MediaOpened="videoElement_MediaOpened" 
              LoadedBehavior="Pause" ScrubbingEnabled="True" />
Related