Reference images stored in external dll using wpf
c#, dll, image, png, wpf
Solution
Assuming you reference the class library from the WPF application you can reference and display the image in the WPF application with the following XAML:
<Image Source="/ClassLibraryName;Component/images/myimage.png"/>
The important thing here is "ClassLibraryName" which is the assembly name for your class library. "/images/myimage.png" is the path to your image.
You can find out more about WPF pack URIs here.
Problem
I have a wpf application and a class library(dll) project. In my dll I have an images folder with some .png files set as Resource. I want to reference and display the image using the wpf main application. Any ideas? I want to do this in the xaml not the code behind if at all possible. Ta, Matt.