Windows Phone 7.x 不显示所有屏幕尺寸的内容

Windows Phone 7.x does not show content to all screen size

我找到问题了。 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 重现。 请注意,即使 运行 7.1 目标应用程序在 WinPhone 8.0 上也有同样的问题。所以原因不在设备上,而是在项目属性的选定目标上。

如何解决? 谢谢。

这是出于应用兼容性原因设计的。 Windows Phone 7.x 应用的设计和测试是 运行 在 480 x 800 像素(9:15 宽高比)的手机上。当 运行 在具有 9:16 屏幕(如 720p 或 1080p)的较新 Windows Phone 8.x 设备上 space 太多时,某些应用程序会不知道如何处理 space。因此,对于为 WP 7.x 构建的应用程序,OS 仅保留屏幕的顶部并向应用程序撒谎,告诉它它仍然是 480 x 800 像素。