Setting ImageSource from File located in Pictures folder RRS feed

  • Question

  • Hello,

    I have an image on a page that has a generic jpg placeholder, but I want the user to be able to select an image from the FileOpenPicker and then change that generic one with the one chosen.

    Now, I am able to retrieve the file absolute path, but when confirming the selection, when doing

     img.Source - new BitmapImage(new Uri(picPath, UriKind.RelativeOrAbsolute));

    it does not display any image (the placeholder is swapped, as if the URI wasn't pointing at anything). I am saving in the app data this uir as a string, so when I do a databinding on another page, the idea would be to automatically get the pictures.

    It was working, but then I decided to do the app as a universal one, and for some reason it does not display the image.

    I have already given permission for the app to access the pictures folder and webcam capabilities, but it doesn't seem to work. Any work arounds?



    Sunday, October 19, 2014 8:52 PM