2011-09-07 34 views
1

我有一個用C#編寫的應用程序,在VS 2010/Windows7pro中有XNA框架。 當試圖使用System.Windows.Control.DrawEventArgs類繪製一個場景(scene.Draw(e.GraphicsDevice))時,應該有一個GraphicsDevice對象可用但沒有。DrawEventArgs GraphicsDevice丟失

我錯過了什麼嗎?

+1

不,它有一個圖形屬性。聽起來你正在混淆命名空間。 GraphicsDevice是XNA,Graphics是Silverlight。 –

+0

你可以顯示你的事件處理程序嗎? –

回答

1

你可以找到答案here它解決了我的同樣的問題。

-1

David Catuhe的博客

該裝置不再由DrawEventArgs類處理。它現在可用於GraphicsDeviceManager.Current.GraphicsDevice。