Windows phone 7 简单横向模式不工作
我添加了一个XAML页面,并尝试使用模拟器在横向模式下运行,它以potrait模式向我显示 以下是我的XAML页面代码:Windows phone 7 简单横向模式不工作,windows-phone-7,landscape-portrait,Windows Phone 7,Landscape Portrait,我添加了一个XAML页面,并尝试使用模拟器在横向模式下运行,它以potrait模式向我显示 以下是我的XAML页面代码: <phone:PhoneApplicationPage x:Class="PhoneApp1.Page1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml
<phone:PhoneApplicationPage
x:Class="PhoneApp1.Page1"
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"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
SupportedOrientations="PortraitOrLandscape" Orientation="Portrait"
mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="480"
shell:SystemTray.IsVisible="True">
<!--LayoutRoot is the root grid where all page content is placed-->
<Grid x:Name="LayoutRoot" Background="Transparent">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<!--ContentPanel - place additional content here-->
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
<Grid.RowDefinitions>
<RowDefinition Height="70"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="190"/>
<ColumnDefinition Width="290"/>
</Grid.ColumnDefinitions>
<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="Text" VerticalAlignment="Center" Grid.Row="0" Grid.Column="0" Margin="30,0,0,0"/>
<TextBox x:Name="txtAdd" TextWrapping="Wrap" VerticalAlignment="Top" FontSize="18.667" Grid.Row="0" Grid.Column="1"/>
</Grid>
</Grid>
<!--Sample code showing usage of ApplicationBar-->
<!--<phone:PhoneApplicationPage.ApplicationBar>
<shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
<shell:ApplicationBarIconButton IconUri="/Images/appbar_button1.png" Text="Button 1"/>
<shell:ApplicationBarIconButton IconUri="/Images/appbar_button2.png" Text="Button 2"/>
<shell:ApplicationBar.MenuItems>
<shell:ApplicationBarMenuItem Text="MenuItem 1"/>
<shell:ApplicationBarMenuItem Text="MenuItem 2"/>
</shell:ApplicationBar.MenuItems>
</shell:ApplicationBar>
</phone:PhoneApplicationPage.ApplicationBar>-->
</phone:PhoneApplicationPage>
谁能告诉我我在这里犯的错误吗?您的代码是正确的。你“旋转”过模拟器吗?emulator窗口旁边的小工具栏顶部的第三个按钮。您的代码是正确的。你“旋转”过模拟器吗?emulator窗口旁边的小工具栏顶部的第三个按钮。你有没有发现这个问题?如果您的XAML没有@Jesper建议的问题,那么它可能只是模拟器。我一直在使用模拟器测试一个本地网站。我有同样的问题,旋转按钮旋转手机,但显示器仍然在纵向模式。我意识到,若我按下Page Up键来使用键盘,那个么IE将始终处于纵向模式。当我再次按下Page Down以使用手机输入时,横向效果正常。不确定这是错误还是故意的,但其他应用程序可能也是如此。你有没有发现这个问题?如果您的XAML没有@Jesper建议的问题,那么它可能只是模拟器。我一直在使用模拟器测试一个本地网站。我有同样的问题,旋转按钮旋转手机,但显示器仍然在纵向模式。我意识到,若我按下Page Up键来使用键盘,那个么IE将始终处于纵向模式。当我再次按下Page Down以使用手机输入时,横向效果正常。不确定这是错误还是故意的,但可能与其他应用程序相同。是的,我做过:)我认为仿真器可能有错误,因为我用Blend做过的同样的事情,它工作得很好!尝试重新启动仿真器:)是的,我做了:)我认为仿真器可能有错误,因为我用Blend做的同样的事情,它工作得非常好!尝试重新启动模拟器:)完美!这也解决了当模拟器在7.5模拟器中处于横向视图时IE显示水平纵向的问题。完美!这也解决了当模拟器在7.5模拟器的横向视图中时IE显示水平纵向的问题。