title: How to play local mp3 files with MediaElement
body: <p>I'm creating a simple media player with Silverlight 4 (C#). Now I'm using the MediaElement but it gives me an error</p>
  
  <blockquote>
    <p>error 4001: .... System.Collections.ListDictionaryInternal</p>
  </blockquote>
  
  <p>Now this error happens when I want to set the source of the MediaElement. So when the user hits "Play", it sets the source of the first song.</p>
  
  <pre><code>Song s = afspeelijst.ElementAt(currentPlayingIndex);
  media.Source = new System.Uri(s.FilePath);
  media.Position = TimeSpan.Zero;
  media.Play();
  </code></pre>
  
  <p>The next code doesn't work either, but it removes the error. But still no sound :s</p>
  
  <pre><code>media.SetSource(new FileStream(s.FilePath, FileMode.Open));
  </code></pre>