Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles
(untagged)

Load external images in WPF via XAML ?

0.00/5 (No votes)
19 Apr 2010 1  
Sometimes we need to show an external image directly in WPF.Assume we have a folder that is named images beside of our main's WPF exe file. There is an image in this folder that's named sample.png.Now with the following XAML code, we can show it in WPF directly:<Image...
Sometimes we need to show an external image directly in WPF.
Assume we have a folder that is named images beside of our main's WPF exe file. There is an image in this folder that's named sample.png.
Now with the following XAML code, we can show it in WPF directly:

XML
<Image Source="pack://siteoforigin:,,,/images/sample.png" />

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here