Hi I want to create a audio player class but having some problems like when audio is finished it is not repeating. While play开发者_开发百科ing audio some UI controls are not working.
If you're using a MediaElement
to play the audio, you can handle the MediaEnded
event and call the Play
method in the handler
Private Sub MediaElement_MediaEnded(ByVal sender As Object, ByVal e As RoutedEventArgs)
Dim m As MediaElement = CType(sender, MediaElement)
m.Play()
End Sub
精彩评论