开发者

How to play songs in the media element when i selected from listbox control in wpf?

i have 7 songs in list box control.if i selected those songs from listbox that songs should be 开发者_如何学JAVAplay in media element?

please help me.. thanks in advance.


You can use the Listbox SelectionChanged event for changing theMediaElement source property like

private void ListBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
    {
        MediaElement1.Source = new Uri(FilePath);
    }

You will get more informatin about this in MediaElement in wpf

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜