Adrien Neveu
Adrien Neveu

Reputation: 827

Hosting XNA in a WPF application

I want to create a Map Editor application in WPF, and I'm using XNA as the game engine.

I followed several tutorials to embed my XNA game into a WPF application, but I couldn't get working any of them.

I found a tutorial which is pretty simple here: (It's in french but all the code is here) http://remember.waralan.fr/?p=497

But when I compile, here's my error:

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.'

How can I fix that?

Upvotes: 0

Views: 178

Answers (1)

Alexander Smirnov
Alexander Smirnov

Reputation: 1655

I've checked the source code and it seems to be working. You just have to check the associated resource files like "white.xnb" that is not included. Just don't use it (comment usage lines in code) or use your own custom resources in content folder.

Supposed file location in build directory is: "Content / white.xnb"

Upvotes: 1

Related Questions