I am trying to fins a relatively simple method to load an icon image into an image control in code behind within a WPF application.
So I have an icon resource called ph_ongo and would like to display the image inside an Image control within a WPF Grid.
The following code doesn't seemto do the trick.
Image img = new Image();
BitmapImage bmp = new BitmapImage();
bmp.UriSource = new Uri("ph_ongo", UriKind.Relative);
img.Stretch = System.Windows.Media.Stretch.Fill;
img.Source = bmp;