1

I'm porting my application from Winforms+XNA to WPF (+ XNA?) and I would like to know if the combination WPF + XNA makes sense or not. If it brings some advantages or if it is rather a bad choice.

A few points about my game:

  • It's a desk game with simple 2D animations (movement)

  • Main window contains panels like available games/players etc. + console.

  • I would like to add some fancy scenes to my program (at end of game, ...)

  • http://www.codeproject.com/KB/WPF/XnaInWPF.aspx is the code I would like my program base on.

  • So the appearance is quite similar to a chess program.

Thank you for suggestions!

Martin Vseticka
  • 25,160
  • 25
  • 118
  • 187

2 Answers2

1

The approach in that article works quite for XNA/WPF integration. There really aren't major issues, and WPF will perform quite well.

That being said, depending on what you're doing, you could potentially do your graphics directly in WPF without XNA - I just mention this, since WPF provides quite rich 2D graphics, and is very easy to use. If you're working in 3D, however, XNA is far superior.

If you want to do more elaborate integration, there are still some issues. Unfortunately, XNA uses the DirectX Managed Pool for resource management, which means it's still (so far) incompatible with D3DImage. There is no way to do fancy WPF brush style usage (like you can with DX) safely with XNA.

Reed Copsey
  • 522,342
  • 70
  • 1,092
  • 1,340
0

Look at this : How well does WPF blend with XNA in real life?

Community
  • 1
  • 1
Venki
  • 1,969
  • 5
  • 29
  • 51