I have a main project in WinForms
and I display pictures within this project with build action set to 'content'. I got a WPF
window to work within my WinForms
project, the only thing that currently does not work is displaying an image with build action set to 'content' within my WPF
window. If I change the build action to 'resource' I can display the images just fine. This does break the functionality in my WinForms
project unfortunately.
So is there any way I can display an image within WPF
with build action set to 'content'? Without breaking my WinForms
project of course, because I show the same image both in WinForms
and WPF
.
EDIT: I found a solution, see my answer further down.
What eventually did the trick for me was shown in this answer combined with this answer.
I chose solution 2a from here:
Then I did: