WPF: How to set image source from DLL resource file?

How to set image source from dll resource file?

<Image Source="res/png_32.png" Width="Auto" Height="Auto"> 

It works fine, but my image is located as a resource in a DLL file. How can i get it?

Thanks.

+4
source share
1 answer

You would handle this with the package URI :

 <Image Source="pack://application:,,,/TheDLLName;component/res/png_32.png" Width="Auto" Height="Auto"> 
+3
source

Source: https://habr.com/ru/post/1497078/


All Articles