I'd like to share some assets like icons between multiple WinRT projects.
With WPF this was a no-brainer (well almost):
What's the best way of sharing them with Windows Runtime?
Is there such a resource embedding and sharing capability, or any other solution?
If no I guess I could add them to every project with "Copy as link" but I hope there is a clean way.
EDIT: I've started to do it naively like I would in a WPF project:
But I can't reference the image with the new URI format:
<Image Source="ms-resource://Assets/Files/Mushroom.png"></Image>
So finally I got the correct result.
Here is the full process:
To reference the image itself you must:
specify an absolute path with /// not //
<Image Source="ms-appx:///Assets/Mushroom.png">
And above all don't trust the Visual Studio designer:
Hope this helps...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With