Regarding the <Game1.Children></Game1.Children> Property commonly used for child elements in XAML.

You must not use it.

Let me repeat: you must NOT use it on a Xnaml.Game derived class. It will render any elements inside the <Game1.Children> tags into a blackhole that you will not be able to see. So don't do it. Instead, when
trying to render WPF controls over the Game itself, just put them inside a generic object, like a Canvas
or a Grid:

<my:Game1 Height="280" HorizontalAlignment="Center" Name="XNAGame" VerticalAlignment="Top" Width="320" ClipToWindow="True" ShrinkToFit="True" Broadcast="XNAGame_Broadcast">
                <Canvas><!-- This canvas will hold the children of the Game. -->
                    <Button Canvas.Left="100" Canvas.Top="114" Content="A Shiny Button. Mmm, Shiny." Height="49" Name="ShinyButton" Width="111" Click="ShinyButton_Click" />
                </Canvas>
            </my:Game1>

Last edited Apr 26, 2012 at 1:29 AM by ThePhD, version 3

Comments

No comments yet.