title: Use monogame with winforms
body: <p>I'm currently trying to create a mapeditor using monogame and winforms in C#. I'm working in Visual Studio 2015 on a Windows 7 machine. I created a winforms project and proceeded by adding the following references: MonoGame.Framework, OpenTk and OpenTK.GLControl. Then I included the following files from the <a href="http://xbox.create.msdn.com/en-US/education/catalog/sample/winforms_series_1" rel="nofollow">XNA Winforms Sample</a>: GraphicsDeviceControl.cs, GraphicsDeviceService.cs and ServiceContainer.cs. When this was done I followed <a href="http://jaquadro.com/2013/03/bringing-your-xna-winforms-controls-to-monogame-opengl/" rel="nofollow">this tutorial</a> to port the XNA Sample to MonoGame. This far everything works.</p>
  
  <p>Then I created this test class to see that it works:</p>
  
  <pre><code>using Microsoft.Xna.Framework;
  using Microsoft.Xna.Framework.Content;
  using Microsoft.Xna.Framework.Graphics;
  using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using System.Threading.Tasks;
  
  namespace TileMapEditor
  {
      class Test : GraphicsDeviceControl
      {
          ContentManager content;
          SpriteBatch spriteBatch;
          Texture2D t;
  
          protected override void Initialize()
          {
              content = new ContentManager(Services, "Content");
              spriteBatch = new SpriteBatch(GraphicsDevice);
  
              t = content.Load&lt;Texture2D&gt;("Gameplay/Player");
          }
  
          protected override void Draw()
          {
              spriteBatch.Begin();
              spriteBatch.Draw(t, new Rectangle(10, 10, t.Width, t.Height), Color.White);
              spriteBatch.End();
          }
      }
  }
  </code></pre>
  
  <p>Then I built the project so this class would show up in the forms designer toolbox. This worked as well so I proceeded by draging the class onto the form in the designer. This showed up as normal as well. Then I built the project once again and hoped that my texture would show up, however, I only got a black window as big as the class I added in the designer, see this picture: <a href="http://prnt.sc/b33my9" rel="nofollow">prnt.sc/b33my9</a> (Can't make a 3rd link since I don't have enough rep)
  I can also mention that Visual Studio 2015 says that the field 'GraphicsDeviceService.parameters' in GraphicsDeviceService.cs is never used. I don't know if that is a part of my problem or not.
  I also tried to replace my code in the Draw function with this line:</p>
  
  <pre><code>GraphicsDevice.Clear(Color.Blue);
  </code></pre>
  
  <p>but I still got the same black window. 
  I've also tried the ported xna sample in the MGWinFormsControls project located in this gitub repo: <a href="http://github.com/jaquadro/MonoGame-WinFormsControls" rel="nofollow">github.com/jaquadro/MonoGame-WinFormsControls</a> and the result is that the 'GraphicsDeviceService.parameters' warning is gone but I still can't get anything except a black window.</p>
  
  <p>Is there anyone that know what I should do to fix this?</p>
  
  <p>Thanks in advance!</p>