I have created a library with xaml views that I wish to address in other tools.
This library accesses another library containing an image.
Unfortunately, this image does not load unless I address a code that is also in the library containing the image.
I've tried to set the image on a combination of "built-in resource", "resource", "content". Put it in folders or create a resource for it.
The only thing that allowed me to get closer to a solution is if I access a code from the library containing the image before loading the window containing the image.
That put everything as specified here: https://stackoverflow.com/a/28901136/6040440
And it seemed to have worked for a number of people.
The only solution I can think of right now is to address code just before I load the window, but that does not seem like an appropriate solution.
The image is loaded in the WPF Xaml like this:
The image has a build action set to "Resource" and copies to the output directory: "Copy if newer".
"Resources" and "Images" are project files.
My structure looks like:
UI.Helper - Resources / Images / SLC_Bird_White.png - Class1.AnyCode () UI.WPF - MainWindow (contains an image)
If I just call the main window, the picture is not visible.
If I call the AnyCode method first, then display the window, the image is loaded. It seems that the library is not loaded when the image is requested.