I'm making application on Windows Phone, and I need to keep photos in my application. They will be around 1-1,5 GB, but I can't download it while application is starting. I would like to make them built-in in project, but I don't know what will be the best way to do it. I read that I can't write data to SD card on Windows Phone. And I'm using local database to keep my other data that can be downloaded, but there is also space limit. What else can I do?

有帮助吗?

解决方案

Just store those files in subfolder (say, MyImages) of your project, and assign them a Content Build Action (set in file's properties). They can be accessed in runtime via new BitmapImage(new Uri("/MyImages/img1.jpg", UriKind.Relative));

And yep, they will not go to the memory card, because apps cannot be installed there. So be careful about device memory limits.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top