I have a winforms form in which I use MediaElement. Everything works (more or less) perfectly. The only thing, after loading the media file (mp3) accessing NaturalDuration.TimeSpan.TotalSeconds, throws an exception
InvalidOperatoinException: The TimeSpan property cannot be returned for the automatic duration value.
(Translation from German itself)
How can I access the timepan resource? There are no special settings used in all the examples I found (ok, they seem to be native WPF ...)
I am using VisualStudio Express.Net 4, C # on Windows 7.
Any clues?
source
share