Hi I have a problem which should be so easy to solve, but apparently it isn't for a former winform developer like me ;-)
So, does anyone have a working sample using Images referenced in a merged ResourceDictionary?
Images must be embedded into my dll/application.
I tried almost all "solutions" found on the internet, but without any luck.
In my resourceDictionary I have(among others) the following entry:
<BitmapImage x:Key="ImageMedal" UriSource="/MyDll;component/Properties/Images/award_star_gold_1.png" />
Nb. I tried building the Image as both Resource and embedded resource, but it doesn't change anything.
My xaml declaration is as the follows:
...
<!--
<Image Source="/MyDll;component/Properties/Images/award_star_gold_1.png"></Image>
<!--
<Image Source="{DynamicResource ImageMedal}"></Image>
...
It does show both images correctly in the designer, but only one of them when deployed.
Nb. I did not export the Image file to the deploy directory; and I don't want to.
The Dictionary is loaded correctly since a lot of other stuff from my merged dictionay works fine.
What am I doing wrong?