4
我试图使用媒体播放器播放歌曲集合中的音乐。windows phone 7中的媒体播放器
是否有可能对代码播放音乐无法暂停?
下面是我的代码:
private void songListBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
songSelectedIndex = songListBox.SelectedIndex;
using (var ml = new MediaLibrary())
{
FrameworkDispatcher.Update();
MediaPlayer.Play(ml.Songs[songSelectedIndex]);
MediaPlayer.IsRepeating = true;
MediaPlayer.Volume = 20.0f;
}
}
我试图用CanPauseProperty,但有一个错误
MediaElement.CanPauseProperty = FALSE;
错误:无法隐式转换类型 '布尔' 到 'System.Windows.DependencyProperty'
我认为这只是一个普通的媒体播放器。芒果之间有什么不同 –
http://msdn.microsoft.com/en-us/library/hh202978(v=vs.92).aspx –
哦,我不使用背景音频播放器 –