开发者

Playing Audio in WPF with repeat on finish

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
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜