protected override void Initialize()
{
base.Initialize();
Size pictureBoxSize = _mainForm.CanvasSize;
ResizeBackBuffer(pictureBoxSize.Width, pictureBoxSize.Height);
_xnaForm.Hide();
BasicEffect = new BasicEffect( GraphicsDevice );
Matrix world = Matrix.Identity;
Matrix projection = Matrix.CreateOrthographicOffCenter(0,
GraphicsDevice.Viewport.Width,
GraphicsDevice.Viewport.Height,
0,
0,
1);
BasicEffect.World = world ;
BasicEffect.Projection = projection ;
}