This project is read-only.

8.1 : "Operation is not valid due to the current state of the object."

Topics: Windows 8 Xaml
Jul 2, 2013 at 3:00 PM
It may just be that I'm doing some things in the wrong order, but this works on Win 8.0:

item.Episode.TimeCode = mediaPlayer.NaturalDuration.TimeSpan.ToString();
mediaPlayer.StartupPosition = item.Episode.ResumePoint;
mediaPlayer.Source = new Uri(url);

The exception is being thrown on the first line when the TimeSpan is being queried.
If I comment this line then everything behaves as I expect.

-- This actually helped me identify redundant code as I don't use this value anymore it seems, but I feel it should still work,