Windows 10, UWP, C#, VS2015: I am trying to set a FallbackValue=ms-appx:///Assets/image.png in Xaml That works well when running the app within Vs2015. However, when creating a store package, the installed version does not display the image at all. What could go wrong? The same scenario worked well in Win8
Asked
Active
Viewed 293 times
1
-
It can be a win 10 bug or something else. Do You have some logger - if not try to make some simple loger which catches what is happening while loading resource – MajkeloDev Oct 30 '15 at 08:05
-
What are the settings for the image in the Properties window? The "Build Action" and the "Copy to Output Directory" values could be interesting... And maybe some differences between Debug and Release settings? – gregkalapos Oct 30 '15 at 08:12
-
I have tried with None, Content, Compile +/- [Always copy]. Useless. I guess I am missing something here – phm Oct 30 '15 at 08:15
-
1...and btw is the image visible in the package? You can rename its extension to .zip and you can look into the package.. is the image.png in the Assets folder? – gregkalapos Oct 30 '15 at 08:20
-
@greg: thanks for this nice tip. All the images are in the resulting package, but not the one that causes the problem. They are all png, they have exactly the same properties as resources. What can cause that single image to fail? – phm Oct 30 '15 at 08:44
-
If it has the same settings as the other files then this should not happen.... I would just make a copy of the png in file explorer, remove the old one (both from visual studio and from the disk) and I just would add the new image to the project. Have you tried this? – gregkalapos Oct 30 '15 at 09:08
-
Yes, I did this already. No result – phm Oct 30 '15 at 09:12
-
The only way I made it work was to remove the "FallbackValue" attribute from the xaml and rely only on the binding value(which returns now a "fallback" when a specific image is not found). The previously missing image is also in package now. It is confusing and pretty illogical, but works. Thanks both for help – phm Oct 30 '15 at 09:25