2012-03-04 3 views
0

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> 

사람이 나에게 내가 여기서 뭐하는 거지 실수를 말할 수 : 여기

내 XAML 페이지의 코드인가?

답변

1

코드가 정확합니다. 에뮬레이터를 "회전"시켰습니까? 에뮬레이터 창 자체 옆의 작은 도구 모음에서 위로부터 세 번째 버튼.

+0

예 나는 그것을 해냈다. :) 나는 그것을 잘 수행 한 것과 똑같은 것으로 에뮬레이터에 실수가있을 것이라고 생각했다. – coder

+0

에뮬레이터를 다시 시작하십시오. –

2

혹시 이것을 알아 냈습니까? @Jesper가 제안한대로 XAML에 문제가 없다면 에뮬레이터 일 수 있습니다. 나는 로컬 웹 사이트를 테스트하기 위해 에뮬레이터를 사용 해왔다. 나는 전화를 돌리는 회전 버튼으로 같은 문제를 겪고 있었지만 디스플레이는 여전히 세로 모드였습니다. Page Up 키를 눌러 내 키보드를 사용하면 항상 IE가 세로 모드로 유지된다는 것을 알았습니다. 전화 입력을 사용하기 위해 Page Down 키를 다시 누르면 가로가 올바르게 작동했습니다. 그것이 버그인지 의도적인지는 모르지만 다른 앱과 동일한 것일 수 있습니다.

+0

Perfect! 또한 에뮬레이터가 7.5 에뮬레이터의 가로보기에있을 때 가로 세로를 표시하는 IE의 문제를 해결합니다. – Adam

관련 문제