Use MonoGame in WPF

Can I mix MonoGame with XAML in a WPF application? For example: the core of the game is written in MonoGame, but the user interface is written in XAML and placed on top of MonoGame-Canvas. I know that I can use XAML on MonoGame in WinRT . Can I do the same in WPF?

+6
source share
2 answers

You should read Nick Gravelin's blog post: http://blogs.msdn.com/b/nicgrave/archive/2010/07/25/rendering-with-xna-framework-4-0-inside-of-a-wpf- application.aspx

This should work for MonoGame, with the exception of the last part, which uses the content building pipeline, since MonoGame does not yet have its own content to build a pipeline implementation.

Here you can find some examples: https://github.com/CartBlanche/MonoGame-Samples

+2
source

MonoGame 3.2 now supports WPF / DirectX. http://www.monogame.net/2014/04/07/monogame-3-2/

0
source

Source: https://habr.com/ru/post/925665/


All Articles