我刚刚开始使用VS2015社区版开发通用Windows应用程序。我使用了名为PieCharts for Windows UWP的示例。
我的问题是,我想像在旧的桌面应用程序中一样将窗口大小固定为400x650。我手动设置了宽度和高度,但并没有起作用。我的MainPage.xaml文件类似于以下代码。
<Page x:Class="MyFistUWP.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:MyFistUWP"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
MaxHeight="650" MinHeight="650" MaxWidth="400" MinWidth="400" Height="650" Width="400" >
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="140" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Image Grid.Row="0" Source="Resources/my_logo.png" />
</Grid>
窗口大小有误,我无法调整窗口大小。
谢谢,