本文介绍了如何在我的音乐播放器应用中添加搜索栏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个使用BackgroundMusicPlayer的音乐播放器,我需要知道的是如何应用搜索栏?



Dileepa S. Rajapaksa

------------------------ ---------

见习开发人员

微软,斯里兰卡


---- ------------

Twitter:@dsrajapaksa

博客:http://www.dileepatech.net

I'm creating a Music Player which used the BackgroundMusicPlayer and what i need to know is how to apply a seek bar to this ?


Dileepa S. Rajapaksa
---------------------------------
Trainee Developer
Microsoft, Sri Lanka

----------------
Twitter : @dsrajapaksa
Blog : http://www.dileepatech.net

推荐答案

}

private void mediaeliment_MediaOpened(object sender,RoutedEventArgs e)

   ;      {

            slider.Maximum = m.NaturalDuration.TimeSpan.TotalMilliseconds;

            ft.Text = m.NaturalDuration.ToString()。子字符串(0,8);

            dispatcherTimer.Tick + = dispatcherTimer_Tick;

            dispatcherTimer.Start();

        }
        private void dispatcherTimer_Tick(object sender,object e)

        {

            slider.Value = m.Position.TotalMilliseconds;

            dt.Text ="   " + m.Position.Hours

                                         +":" +
m.Position.Minutes

                                         +":" +
m.Position.Seconds +" /" ;;

        }

private void mediaeliment_MediaOpened(object sender, RoutedEventArgs e)
        {
            slider.Maximum = m.NaturalDuration.TimeSpan.TotalMilliseconds;
            ft.Text = m.NaturalDuration.ToString().Substring(0, 8);
            dispatcherTimer.Tick += dispatcherTimer_Tick;
            dispatcherTimer.Start();
        }
        private void dispatcherTimer_Tick(object sender, object e)
        {
            slider.Value = m.Position.TotalMilliseconds;
            dt.Text = "   " + m.Position.Hours
                                        + ":" + m.Position.Minutes
                                        + ":" + m.Position.Seconds + " /";
        }}

这一个简单而有帮助....必须尝试这一点......并投票

This one easy and helpful....Must try this... and vote


这篇关于如何在我的音乐播放器应用中添加搜索栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-23 03:03