title: Accessing embedded image and creating a System.Windows.Controls.Image
body: <p>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. </p>
  
  <p>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 :</p>
  
  <pre><code>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;
          }
  </code></pre>
  
  <p>Please let me know if you require anymore information</p>