Binding Bitmapimge to Image in Wpf?

Posted by Rev on Stack Overflow See other posts from Stack Overflow or by Rev
Published on 2010-05-01T04:51:08Z Indexed on 2010/05/01 4:57 UTC
Read the original article Hit count: 221

Filed under:

This is a simple Question (lets see)

I want to bind bitmap image to Image. For doing this in cs code u must write this line.

this.leftImage.Source = new BitmapImage(new Uri(@"C:\a.bmp"));

But I want make Binding from resources. Because In release time resources became part of project.exe file and if you make binding from file(Mean set Image.source with Image file address), you must always put image file in the same address(disaster programing) :)

© Stack Overflow or respective owner

Related posts about wpf