Orientation in Cocos2D XNA Template Project

Topics: Platform UI
Aug 12, 2013 at 4:33 AM
Edited Aug 12, 2013 at 9:06 AM
Hi,
Can any one help me change orientation of my project. I've created a project follow link : codeplex xna, with WP8 Cocos2d XNA Template instead of Windows Template. But when I run, you can see Image How can I set full screen in landscape mode (rotate 90degree) ?

Then I change my GamePage.xaml follow Fixing the landscape mode for the empty project template.
From
<DrawingSurfaceBackgroundGrid x:Name="XnaSurface" Background="Transparent">
        <MediaElement x:Name="XnaMediaElement" HorizontalAlignment="Left" VerticalAlignment="Top"/>
    </DrawingSurfaceBackgroundGrid>
To
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <DrawingSurface x:Name="XnaSurface"/>
        <MediaElement></MediaElement>
    </Grid>
I did not see any thing :|
The device screen is black....

Please support me.
Many thanks!
Coordinator
Aug 12, 2013 at 6:29 PM
Your gamepage XAML should look like this:

<phone:PhoneApplicationPage
x:Class="TestWin8Phone.GamePage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
SupportedOrientations="Landscape"
shell:SystemTray.IsVisible="False">

<Grid x:Name="LayoutRoot" Background="Transparent">
    <DrawingSurface x:Name="XnaSurface"/>
    <MediaElement></MediaElement>
</Grid>
</phone:PhoneApplicationPage>
Coordinator
Aug 12, 2013 at 6:29 PM
Aug 13, 2013 at 1:43 AM
Thanks Totallyevil,
It work fine!