WPF,如何确定 MediaElement 何时完成播放电影? [英] WPF, how to determine when a MediaElement has finished playing the movie?

查看:45
本文介绍了WPF,如何确定 MediaElement 何时完成播放电影?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在我的应用程序上播放一部电影,我希望应用程序只播放一次.播放完毕后,我想启用一些按钮(播放、倒带、再次观看等...),但是有什么方法可以在电影结束时获得事件 - 或者任何可以实现这种情况的方法?

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?

干杯,

推荐答案

MediaElement.MediaEnded 事件应该可以帮助您

这篇关于WPF,如何确定 MediaElement 何时完成播放电影?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆