title: How to reference the Paint.NET assemblies directly using C#
body: <p>I wanted to reference the Paint.NET assemblies directly and use a its functionality that way. i dont know how to use the .dll file <strong>PaintDotNet.Core.dll</strong>
  and use it functionality in C# visual studio any helps. Please</p>
  <p><strong>want to reference to these assemblies: C:\Program Files\Paint.NET\PaintDotNet.*.dll Then poke around the classes in those namespaces.</strong></p>
  <p>Codes:-</p>
  <pre><code>  private void button2_Click(object sender, EventArgs e)
  {
      OpenFileDialog ofd = new OpenFileDialog();
      string filename = &quot;&quot;;
  
      if (ofd.ShowDialog() == DialogResult.OK)
      {
          filename = System.IO.Path.GetFullPath(ofd.FileName);
      }
     // MessageBox.Show(filename, &quot;file&quot;);
      pictureBox1.ImageLocation = filename;
      pictureBox1.SizeMode = PictureBoxSizeMode.StretchImage;
  
      DialogResult result = MessageBox.Show(&quot;Do you wish to continue?&quot;, &quot;Save Changes&quot;, MessageBoxButtons.YesNo, MessageBoxIcon.Question);
      if (result == DialogResult.Yes)
      {
          System.Diagnostics.Process.Start(@&quot;C:\Program Files\Paint.NET\PaintDotNet.exe&quot;);
         // here i need to perform the function like
         //Open + O`
         //ctrl + Shift + L)` then `
         //(ctrl + Shift + G)`. then save 
         //`ctrl + Shift + S`
      }
      else
      {
          return;
      }
  }
  </code></pre>