I am having a hard time changing my image. I am pretty sure it has something to do with image.source
i can get my img to show the .source but i dont know how to put in the value for the new picture..
Any idea?
Image.Source
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Bechir BejaouiRank #144 · 15.9K reputationPosted Sep 6, 2008, 1:42 AM EDT
but in wpf context this is the appropriate code:
Image myImage3 = new Image();
BitmapImage bi3 = new BitmapImage();
bi3.BeginInit();
bi3.UriSource = new Uri("smiley_stackpanel.PNG", UriKind.Relative);
bi3.EndInit();
myImage3.Stretch = Stretch.Fill;
myImage3.Source = bi3;
this example is found in MSDN
Bechir BejaouiRank #144 · 15.9K reputationPosted Sep 6, 2008, 1:42 AM EDT
but in wpf context this is the appropriate code:
Image myImage3 = new Image();
BitmapImage bi3 = new BitmapImage();
bi3.BeginInit();
bi3.UriSource = new Uri("smiley_stackpanel.PNG", UriKind.Relative);
bi3.EndInit();
myImage3.Stretch = Stretch.Fill;
myImage3.Source = bi3;
this example is found in MSDN