title: WPF image control source
body: <p>im trying to recreate a very simple example of a C# project i WPF, its a simple image viewer.. from the sam's teach yourself C#, ive managed to get the open file dialog to open, but how do i set the image path to the image.source control in WPF?</p>
  
  <pre><code>private void SearchBtn_Click(object sender, RoutedEventArgs e)
  {
       Microsoft.Win32.OpenFileDialog openfile = new Microsoft.Win32.OpenFileDialog();
       openfile.DefaultExt = "*.jpg";
       openfile.Filter = "Image Files|*.jpg";
       Nullable&lt;bool&gt; result = openfile.ShowDialog();
       if (result == true)
       {
         //imagebox.Source = openfile.FileName;
       }
  }
  </code></pre>