WPF, how to determine when a MediaElement has finished playing the movie?

H4mm3rHead picture H4mm3rHead · Nov 15, 2009 · Viewed 7.5k times · Source

I am showing a movie on my application, and i want the application to only play it once. And when its done playing i want to enable some buttons (play, rewind, watch again etc...) but is there any way i can get an event when the movie has finished - or anything that would accomplish this scenario?

Cheers,

Answer

Simon Fox picture Simon Fox · Nov 15, 2009

The MediaElement.MediaEnded event should help you