<p>I understand that there are several ways to blend XNA and WPF within the same application. I find it enticing to use WPF for all GUI and HUD stuff in my XNA games. Does anyone have any practical experience on how well this approach works in real life using .NET 3.5 SP1 ? Any pitfalls (such as the <a href="http://blogs.msdn.com/nickkramer/archive/2005/07/14/438640.aspx" rel="nofollow noreferrer">"airspace problem"</a>)? Any hint on what appoach works best?</p>

[{'answer_id': 44218, 'author': 'Kris Erickson', 'author_id': 3798, 'author_profile': 'https://Stackoverflow.com/users/3798', 'pm_score': 4, 'selected': True, 'text': '<p>There is an addition in 3.5 SP1 that allows better interaction between DirectX and WPF (D3DImage), and one way to get to that is through XNA.</p>\n\n<p>Here are some details:</p>\n\n<p><a href="http://jmorrill.hjtcentral.com/Default.aspx?tabid=428&amp;EntryID=259" rel="nofollow noreferrer">http://jmorrill.hjtcentral.com/Default.aspx?tabid=428&amp;EntryID=259</a></p>\n'}, {'answer_id': 49281, 'author': 'rudigrobler', 'author_id': 5147, 'author_profile': 'https://Stackoverflow.com/users/5147', 'pm_score': 1, 'selected': False, 'text': '<p>Thamir Khason presented a excellent session about WPF/XNA/Silverlight at Tech-ed... Here is his slides:\n<a href="http://blogs.microsoft.co.il/blogs/tamir/archive/2008/04/14/my-teched-08-presentation-slides-download.aspx" rel="nofollow noreferrer">http://blogs.microsoft.co.il/blogs/tamir/archive/2008/04/14/my-teched-08-presentation-slides-download.aspx</a></p>\n\n<p>PS. This was quite impressive to see... he had a game that ran on the xbox. On his desktop using WPF to host XNA and ons his mobile phone using silverlight all playing against each other!!!</p>\n'}, {'answer_id': 64954, 'author': 'Joel Martinez', 'author_id': 5416, 'author_profile': 'https://Stackoverflow.com/users/5416', 'pm_score': 0, 'selected': False, 'text': '<p>I personally would advise against trying to do this integration.  I know what you\'re going for ... the ease of defining GUI/HUD elements in WPF greatly outweighs trying to do the same in just plain old XNA.  However, think realistically of the time you\'ll spend trying to enable this scenario vs. how much you\'d save if you just did everything "natively" in XNA.  Also (and this may not be an issue for you), WPF isn\'t supported on the xbox or zune ... so you\'d be limiting yourself :-)</p>\n'}, {'answer_id': 119786, 'author': 'rudigrobler', 'author_id': 5147, 'author_profile': 'https://Stackoverflow.com/users/5147', 'pm_score': 3, 'selected': False, 'text': '<blockquote>\n  <p>XNA integration is high on our list of things to add to WPF so we\'re looking in to this for future versions. Stay tuned (to GregSc\'s blog) for the details as they become available.</p>\n</blockquote>\n\n<p>Ian Ellison-Taylor</p>\n\n<p>Read more about this <a href="http://groups.google.com/group/wpf-disciples/browse_thread/thread/82cc834ecb195913/0820be490bb4a706?show_docid=0820be490bb4a706" rel="nofollow noreferrer">here</a></p>\n'}, {'answer_id': 3773710, 'author': 'markblue777', 'author_id': 102324, 'author_profile': 'https://Stackoverflow.com/users/102324', 'pm_score': 0, 'selected': False, 'text': '<p>Hey I know this is a while after you posted but if you are still looking for a WPF solution for XNA you may want to keep an eye on <a href="http://red-badger.com/product" rel="nofollow noreferrer">http://red-badger.com/product</a>. The XPF soloution puts wpf into XNA. SO have a look, at the moment it is free as it is in beta but that will be changing as they add more components</p>\n'}, {'answer_id': 3792742, 'author': 'zezba9000', 'author_id': 456832, 'author_profile': 'https://Stackoverflow.com/users/456832', 'pm_score': 1, 'selected': False, 'text': '<p>You want to use a D3DImage, but D3DImage works different on windows XP vs windows Vista or 7.</p>\n\n<p>On Vista or 7, you create a NON-lockable renderTarget to use with the D3DImage &amp; you use a Direct3D9EX Device.\nOn XP, you create a lockable renderTarget to use with the D3DImage &amp; use a normal Direct3D9 Device.</p>\n\n<p>Also insted of using XNA it might be better to use SlimDX if your just making this for the PC. SlimDX is not lacking any Direct3D features &amp; supports Direct3D 9, 10 &amp; 11.</p>\n\n<p><a href="http://slimdx.org/" rel="nofollow">http://slimdx.org/</a></p>\n'}]
['https://Stackoverflow.com/questions/43596', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4227/']