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

冷暖自知 提交于 2019-12-05 18:49:55

问题


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,


回答1:


The MediaElement.MediaEnded event should help you



来源:https://stackoverflow.com/questions/1738967/wpf-how-to-determine-when-a-mediaelement-has-finished-playing-the-movie

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!