0

In my windows phone 8 app, I have some images in IsolatedStorge under a folder named 'ProfileImages'.

Suppose I want to get a URI to an image named 'a.jpg' :

In C# I can do it as,

Uri uri = new Uri("/ProfileImages/a.jpg", UriKind.Relative);

Since Windows::Foundation::Uri in C++/CX, doesn't support relative Uri, I tried something like

this->imageUri = ref new Uri("appdata:/ProfileImages/a.jpg");

But this didn't work out. What's the solution?

Arctic
  • 807
  • 10
  • 22
  • You obviously can create such a Uri. That'll work. But then we have to guess what you want to do with it, because you tell us that it doesn't work. What do you want to do with this? Set the Source property of an Image control maybe? Open the file for reading maybe? Or something else? We're not psychics... – Kris Vandermotten Aug 04 '14 at 10:41
  • Change appdata to isostore and add UriKind.Absolute. It should work. – Filip Aug 04 '14 at 10:45
  • I used the Uri for the parameter 'contactImage' when invoking VoipCallCoordinator.RequestNewIncomingCall method. Method used to work fine, before I made the parameter to point to image in isolated storage – Arctic Aug 04 '14 at 10:48
  • @Parad1s3 It doesn't work for me. An msft MVP also says it may not work "http://mark.mymonster.nl/2013/05/24/yeah-windows-phone-supports-isolated-storage-access-through-an-uri-scheme-does-it" – Arctic Aug 04 '14 at 11:13

0 Answers0