2014-02-22 58 views
0

託管XNA我想創建一個WPF地圖編輯器應用程序,我使用XNA的遊戲引擎。在WPF應用程序

我跟着幾個教程將我的XNA遊戲嵌入到WPF應用程序中,但是我無法工作。

我發現了一個教程,在這裏很簡單:(這是在法國,但所有的代碼是在這裏) http://remember.waralan.fr/?p=497

但是當我編譯,這是我的錯誤:

A first chance exception of type 'System.Windows.Markup.XamlParseException' occurred in PresentationFramework.dll 

Additional information: Additional information: 'The invocation of the constructor on type 'WpfApplication1.MainWindow' that matches the specified binding constraints threw an exception.' 

我怎麼能修復?

回答

1

我檢查源代碼,它似乎是工作。您只需檢查未包含的關聯資源文件(如「white.xnb」)。只是不要使用它(代碼中的註釋使用行)或在內容文件夾中使用您自己的自定義資源。

在build目錄應該文件的位置是: 「內容/ white.xnb

+0

事實上,這是問題! 謝謝! –