i have 7 songs in list box control.if i selected those songs from listbox that songs should be play in media element?
please help me.. thanks in advance.
You can use the Listbox
SelectionChanged
event for changing the MediaElement
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
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.