title: 'System.Windows.Controls.Image' does not contain a definition for 'FromFile'
body: <p>I want to make a WPF app to show some images on my hard drive.
  Here's my attempt : </p>
  
  <pre><code>using System.Windows.Controls;
  using System.Windows.Data;
  using System.Windows.Documents;
  using System.Windows.Input;
  using System.Windows.Media;
  using System.Windows.Media.Imaging;
  using System.Windows.Navigation;
  using System.Windows.Shapes;
  using System.Drawing;
  
  namespace Photo
  {
  
      public partial class MainWindow : Window
      {
          public MainWindow()
          {
              InitializeComponent();
  
              Image myimage = Image.FromFile(@"C:\images\myimage.jpg");
          }
      }
  }
  </code></pre>
  
  <p>Here is the error I get : </p>
  
  <blockquote>
    <p>'System.Windows.Controls.Image' does not contain a definition for
    'FromFile'</p>
  </blockquote>
  
  <p>How can I get rid of this error? Thanks..</p>