I am getting an image in the format System.Drawing.Image from a 3rd party dll at runtime. This image is to be set to a WPF Image control on the UI. How to achieve this.
Note that the image is in memory and not stored on disk.
Please help.
I am getting an image in the format System.Drawing.Image from a 3rd party dll at runtime. This image is to be set to a WPF Image control on the UI. How to achieve this.
Note that the image is in memory and not stored on disk.
Please help.
Assuming the library's name is TestLibrary
and the path toof the image is /Images/Image1.png
. You can set Image's Source property like below.
<Image Source="/TestLibrary;Component/Images/Image1.png"/>
You can visit Pack URIs in WPF for further reference.