Windows Phone 7.x不会显示所有屏幕大小的内容

时间:2015-01-28 19:11:07

标签: windows-phone-7 windows-phone-8 windows-phone windows-phone-8.1 windows-phone-7.1

我发现了这个问题。 对于W.P.中的所有屏幕尺寸,未示出相同的xaml。 7.1但是在W.P. 8。 有标准的项目模板,红色边框,以查看差异:

<phone:PhoneApplicationPage 
x:Class="PhoneApp1.MainPage"
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"
shell:SystemTray.IsVisible="True">
<Border BorderBrush="Red" BorderThickness="2">
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
            <TextBlock x:Name="ApplicationTitle" Text="MY APPLICATION" Style="{StaticResource PhoneTextNormalStyle}"/>
            <TextBlock x:Name="PageTitle" Text="page name" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
        </StackPanel>
        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0"></Grid>
    </Grid>
</Border>

请参见截图 - http://wp-hub.in.ua/all.png

左侧部分正在运行7.1目标项目,右侧 - 8.0 仅为模拟器720p重现。 请注意,即使在WinPhone 8.0上运行7.1目标应用程序,它也有同样的问题。所以原因不在于设备,而是在项目属性的选定目标上。

如何解决? 谢谢。

1 个答案:

答案 0 :(得分:0)

这是针对app-compat原因的设计。 Windows Phone 7.x应用程序经过设计和测试,可在480 x 800像素(9:15宽高比)的手机上运行。当在具有9:16屏幕(如720p或1080p)的较新Windows Phone 8.x设备上运行时,空间太大而某些应用程序不知道如何处理该空间。因此,对于为WP 7.x构建的应用程序,操作系统只保留屏幕的顶部,并且位于应用程序中,告诉它仍然是480 x 800像素。