//monoFrameworkAlias.Microsoft.Xna.Framework.Graphics.GraphicsDevice monoDevice)
 //public monoFrameworkAlias.Microsoft.Xna.Framework.Graphics.GraphicsDevice MonoDevice { get; private set; }
 public LoadContentArgs(GraphicsDevice device, GraphicsDeviceService graphicsService, ServiceContainer services)
 {
     GraphicsDevice = device;
     GraphicsService = graphicsService;
     Services = services;
     //MonoDevice = monoDevice;
 }
        void XnaWindowHost_Loaded(object sender, RoutedEventArgs e)
        {
            if (graphicsService == null)
            {
                graphicsService = GraphicsDeviceService.AddRef(hWnd, (int)ActualWidth, (int)ActualHeight);
                //monoGraphicsService = MonoGraphicsDeviceService.AddRef(hWnd, (int)ActualWidth, (int)ActualHeight);

                services.AddService<IGraphicsDeviceService>(graphicsService);
                //services.AddService<monoFrameworkAlias.Microsoft.Xna.Framework.Graphics.IGraphicsDeviceService>(monoGraphicsService);

                if (LoadContent != null)
                {
                    LoadContent(this, new LoadContentArgs(graphicsService.GraphicsDevice, graphicsService, services));//, monoGraphicsService.GraphicsDevice));
                }
            }
        }
        protected override void Dispose(bool disposing)
        {
            if (graphicsService != null)
            {
                graphicsService.Release(disposing);
                graphicsService = null;
            }

            //if (monoGraphicsService != null)
            //{
            //    monoGraphicsService.Release(disposing);
            //    monoGraphicsService = null;
            //}

            CompositionTarget.Rendering -= CompositionTarget_Rendering;
            base.Dispose(disposing);
        }