我需要一个教程来制作媒体“寻找者”,最好不要编写太多的代码。 [英] I need a tutorial to make a media 'seeker', preferably without writing too much code.

查看:49
本文介绍了我需要一个教程来制作媒体“寻找者”,最好不要编写太多的代码。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经尝试过搜索网络和论坛。我找不到任何...

I've already tried searching both the web and the forums. I can't find any...

推荐答案

Border b = (Border)sender;
Point p = e.GetPosition(b);
Double pourcentPosition = p.X / b.ActualWidth * 100;

if (pourcentPosition >= DownloadProgressBar.Value * 100)
{
    pourcentPosition = DownloadProgressBar.Value * 100;
}

Media.Position = TimeSpan.FromSeconds(Media.NaturalDuration.TimeSpan.TotalSeconds / 100 * pourcentPosition);


这篇关于我需要一个教程来制作媒体“寻找者”,最好不要编写太多的代码。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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