title: Choosing image from windows phone media library and set as page background
body: <p>I am trying to retrieve an image from the phone library and set it as the page background using the following code</p>
  
  <pre><code>    private void selectImageFromMediaLib()
      {
           selectphoto = new PhotoChooserTask();
           selectphoto.Completed += new EventHandler&lt;PhotoResult&gt;(selectphoto_Completed);
       selectphoto.Show();
      }
  
      private void selectphoto_Completed(object sender, PhotoResult e)
      {
          if (e.TaskResult == TaskResult.OK)
          {
              backgroundUri = new Uri(e.OriginalFileName, UriKind.Absolute);
              var bitmap = new BitmapImage(backgroundUri);
              ImageBrush imageBrush = new ImageBrush();
              imageBrush.ImageSource = bitmap;
              this.LayoutRoot.Background = imageBrush;     
       }
      }
  </code></pre>
  
  <p>However, the page background turns black so the photo was not retrieved/created correctly. What is the correct path for the URI to the device library? Isn't using <code>UriKind.Absolute</code> enough?</p>
  
  <p><img src="https://i.stack.imgur.com/nN52b.png" alt="enter image description here"></p>