我有一个用C#编写的应用程序,在VS 2010/Windows7pro中有XNA框架。 当试图使用System.Windows.Control.DrawEventArgs类绘制一个场景(scene.Draw(e.GraphicsDevice))时,应该有一个GraphicsDevice对象可用但没有。DrawEventArgs GraphicsDevice丢失
我错过了什么吗?
我有一个用C#编写的应用程序,在VS 2010/Windows7pro中有XNA框架。 当试图使用System.Windows.Control.DrawEventArgs类绘制一个场景(scene.Draw(e.GraphicsDevice))时,应该有一个GraphicsDevice对象可用但没有。DrawEventArgs GraphicsDevice丢失
我错过了什么吗?
你可以找到答案here它解决了我的同样的问题。
从David Catuhe的博客
该装置不再由DrawEventArgs类处理。它现在可用于GraphicsDeviceManager.Current.GraphicsDevice。
不,它有一个图形属性。听起来你正在混淆命名空间。 GraphicsDevice是XNA,Graphics是Silverlight。 –
你可以显示你的事件处理程序吗? –