Loading an external image via XAML code in WPF?

Posted by Mohammad on Stack Overflow See other posts from Stack Overflow or by Mohammad
Published on 2010-04-18T12:32:13Z Indexed on 2010/04/18 12:33 UTC
Read the original article Hit count: 376

Filed under:
|
|
|
|

I have an image lock.png beside of my WPF exe file in the images folder. Now, I'm gonna load it into the WPF Project as an image, I've used the following XAML code:

<Image Stretch="Fill" Source="pack://siteoforigin:,,,/images/lock.png" />

It works, but Expression Blend or Visual Studio doesn't show it when I'm working on the project.
How can we show external images in these situations?

© Stack Overflow or respective owner

Related posts about wpf

Related posts about image