Hi! I Create monogame project for wp8.1, but i cann’t add sub element for SwapChainBackgroundPanel, they just are not displayed.
Simple:
Xaml:
<SwapChainBackgroundPanel
x:Class="Game1.GamePage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Game1"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Grid>
<Button Content="THIS IS THE TEST BUTTON" Background="Red" HorizontalAlignment="Center"/>
</Grid>
</SwapChainBackgroundPanel>
C#:
public sealed partial class GamePage : SwapChainBackgroundPanel
{
readonly Game1 _game;
public GamePage()
{
this.InitializeComponent();
}
public GamePage(string launchArguments)
{
_game = XamlGame<Game1>.Create(launchArguments, Window.Current.CoreWindow, this);
}
}
Button not show. How to solve this problem?