I have seen this thread: WPF image resources and applied the information there. But my situation seems a bit more tricky:
A
is a class library
Dialog.xaml
Images/i.gif
B
is a WPF application
Dialog.xaml
In my dialog, I have tried specifying the image in the following ways:
<Image Source="/Images/i.gif"/>
and
<Image Source="pack://application:,,,/Images/i.gif"/>
both work, but only in the designer!
Next, I added two and two together to yield:
<Image Source="pack://application:,,,A;;content/Images/i.gif"/>
but this shows the same symptoms:
As soon as I start the application, the images seem to be not found. I don't know for sure, since I get no error message. They just don't show up.
Any ideas?
You appear to be missing the required word "Component" form the beginning of your path, e.g.
pack://application:,,,/YourAssembly.Name;Component/Images/PlusGreen.png
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