Hello
I have the following UX Markup and JavaScript:
<Image File="{logo}" />
var companies = [{ logo: "a-logo.png" }, { logo: "another-logo.png" }, { logo: "yet-another-logo.png }]
var logo = Observable();
function nextCompany() {
index++;
logo.value = companies[index].logo;
}
module.exports = {
logo: logo
}
The above results in the error Could not find a part of the path 'C:\Program Files (x86)\Fuse\Assets\a-logo.png' (...)
.
I found a similar thread, image path binding, where the solution was to use FileImageResource. I verified that it works, but since my app has a lot of logos/images, I’d like to avoid having to (manually) specify a FileImageResource for each, e.g.
<FileImageSource ux:Key="a-logo" File="Assets/a-logo.png" />
<FileImageSource ux:Key="another-logo" File="Assets/another-logo.png" />
<FileImageSource ux:Key="yet-another-logo" File="Assets/yet-another-logo.png" />
... and hundreds more...
Anyone?