I had set up to access an embedded resource and return an System.Drawing.Image but i cant use this to set the background of a canvas.
Could someone please show me how to access an embedded image file and create a System.Windows.Controls.Image. Code I have so far is :
public static Image Load(Type classType, string resourcePath)
{
Assembly asm = Assembly.GetAssembly(classType);
Stream imgStream = asm.GetManifestResourceStream(resourcePath);
Image img = Image.FromStream(imgStream);
imgStream.Close();
return img;
}
Please let me know if you require anymore information