title: how to show images in windows phone media viewer?
body: <p>I am trying to show bitmap images using windows phone media viewer nuget package. </p>
  
  <p>My code sample:</p>
  
  <p>xaml code:</p>
  
  <pre><code>&lt;controls:MediaViewer x:Name="MediaViewer"
                        InitiallyDisplayedElement="First" /&gt;
  </code></pre>
  
  <p>c# code:</p>
  
  <pre><code>ObservableCollection&lt;object&gt; slideShowImages = new ObservableCollection&lt;object&gt;();
  
  protected override void OnNavigatedTo(NavigationEventArgs e)
  {
      base.OnNavigatedTo(e);
      string filepath = "Assets";
      DirectoryInfo d = new DirectoryInfo(filepath);
      foreach (var file in d.GetFiles("*.png"))
      {
          Image img = new Image();
          img.Source = new BitmapImage(new Uri("/" + filepath + "/" + file.Name, UriKind.Relative));
          slideShowImages.Add(img);
      }
      MediaViewer.Items = slideShowImages;
  }
  </code></pre>
  
  <p>But in media viewer I am getting only a black screen. Is there any way to show bitmap images in windows phone media viewer?</p>