Xaml 更改方向以自动横向移动windows phone Gap

Xaml 更改方向以自动横向移动windows phone Gap,xaml,cordova,windows-phone,Xaml,Cordova,Windows Phone,我正在使用PhoneGap for windows phone构建我的第一个手机应用程序,我正在尝试使其在加载时自动更改为横向。我在MainPage.xaml中更改了此设置 SupportedOrientations="LandscapeOrPortrait" Orientation="Portrait" 对此 SupportedOrientations="Landscape" Orientation="Landscape" 当我把它放在手机上时,它仍然允许我切换到肖像,我是不是遗漏了什么?

我正在使用PhoneGap for windows phone构建我的第一个手机应用程序,我正在尝试使其在加载时自动更改为横向。我在MainPage.xaml中更改了此设置

SupportedOrientations="LandscapeOrPortrait" Orientation="Portrait"
对此

SupportedOrientations="Landscape" Orientation="Landscape"

当我把它放在手机上时,它仍然允许我切换到肖像,我是不是遗漏了什么?提前谢谢

现在修复了这个问题,在App.xaml文件中有一个部分说:

PhoneApplicationPage.Orientation="Landscape"
甚至不完全清楚为什么会有这个,但它需要被移除