MediaElement-擦洗和播放音频的当前位置? [英] MediaElement - Scrubbing and current position for playing audio?
本文介绍了MediaElement-擦洗和播放音频的当前位置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我正在开发一个使用MediaElelement仅播放音频文件的小型应用程序.我如何使它能够进行擦洗并显示正在播放的歌曲的当前位置?我以为滑块控件可以完成这项工作,但是我不知道怎么做:)
I'm working on a small app that uses the MediaElelement to play audio files only. How do I make it so that it enable scrubbing as well as displays the current position of the song being played? I'm thinking that the slider control would do the job, but I don't know how :)
推荐答案
MediaTimeline的代码示例向您展示了如何来连接您要跟踪进度的滑块控件.
http://msdn.microsoft.com/zh-cn/library/system.windows.media.mediatimeline.aspx
通过设置'ScrubbingEnabled =' ;真在XAML中.
The code example from MediaTimeline shows you how to hook up the slider control you're asking about for tracking progress.
http://msdn.microsoft.com/en-us/library/system.windows.media.mediatimeline.aspx
Enable scrubbing on your MediaElement instance by setting 'ScrubbingEnabled="True"' in XAML.
这篇关于MediaElement-擦洗和播放音频的当前位置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文