Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

WinPhone: Image.Source & images stored in LocalFolder

$
0
0

My app download some images from a web server and store they in the device local folder

ApplicationData.Current.LocalFolder.Path

which, using the WinPhone emulator, is for instance

C:\Data\Users\DefApps\AppData\{685FD7A5-7828-47D4-8648-A723860F7E15}\local

Then I need to show that images using the XF Image component. To do this I’m setting the Image.Source property in that way:

image.Source = Path.Combine(ApplicationData.Current.LocalFolder.Path, imageSubPath).Replace("\\", "/");

The result image.Source is something like below

C:/Data/Users/DefApps/AppData/{685FD7A5-7828-47D4-8648-A723860F7E15}/local/Images/2015/07/cardio_R.png

That seems correct, but the images are not showed (WP.01.png) ! Any excption is thrown.

The same approach works perfectly with Win 8.1. Below an example that works perfectly with Win 8.1 emulator and local machine (Win.01.png) :

C:/Users/alestr/AppData/Local/Packages/9cb41f26-4e9c-4faf-a757-0a8f5a8433b8_vas19t7ah9en4/LocalState/Images/2015/07/osteo_R.png

What am I doing wrong?

Thanks


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>