Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/266.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 处理Windows 8.1应用商店应用程序的不同窗口大小,Visual Studio 2012_C#_Xaml_Windows 8_Windows Store Apps_Windows 8.1 - Fatal编程技术网

C# 处理Windows 8.1应用商店应用程序的不同窗口大小,Visual Studio 2012

C# 处理Windows 8.1应用商店应用程序的不同窗口大小,Visual Studio 2012,c#,xaml,windows-8,windows-store-apps,windows-8.1,C#,Xaml,Windows 8,Windows Store Apps,Windows 8.1,我正在使用Visual Studio 2012开发Windows 8.1应用商店应用程序。我在我的项目中添加了一个基本的空白页,请参见下面的XAML- <Page Name="BlankPage" x:Class="Game.Views.BlankPage1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.

我正在使用Visual Studio 2012开发Windows 8.1应用商店应用程序。我在我的项目中添加了一个基本的空白页,请参见下面的XAML-

<Page
    Name="BlankPage"
    x:Class="Game.Views.BlankPage1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:Game.Views"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <Grid Background="White">    
    </Grid>
</Page>

我的问题是,当我尝试将我的应用程序停靠在另一个Windows 8.1应用程序旁边,将其重新调整为不同的窗口大小时,空白页的大小不正确。当我的应用程序自行运行时,我看到“白色背景”覆盖了整个屏幕。然而,当我将它停靠在另一个Windows8.1应用程序旁边时,“白色背景”出现在中心,覆盖了分配给它的屏幕大小的60%。我尝试在BlankPage1.xaml.cs中的Windows SizeChanged事件处理程序中将页面大小手动设置为NewSize宽度,但没有成功


为什么我的页面不能覆盖分配给它的全部区域?当我创建从BasicLayoutAwarePage派生的Windows 8应用程序页面时,该页面可以正常工作,但在Windows 8.1中无法正常工作。看起来Visual Studio 2013可以使用NavigationHelper API轻松地处理此问题,但我没有找到一种轻松处理此问题的方法—Visual Studio 2012?

需要使用Visual Studio 2013开发Windows 8.1应用商店应用程序


尽管您可以在Windows 8.1设备上构建和运行Windows 8应用程序,但在您使用Visual Studio 2013将应用程序重新定向到Windows 8.1之前,这些应用程序可能无法正常工作。

能否发布问题的屏幕截图?您确定这是Windows 8.1应用程序吗?您需要visual studio 2013来开发8.1应用程序,而不是2012,并且新模板中未使用LayoutWarePage@我想你是对的。我正在Windows 8.1上开发应用程序,也可以在Windows 8.1上运行。所以,我假设我的应用程序是为8.1构建的,但从它的行为来看,它看起来像是一个Windows8应用程序。