繁体   English   中英

如何使UI视图填充Visual Studio中的整个XAML设计器窗口

[英]How to make the UI view fill the entire XAML Designer Window in Visual Studio

我正在尝试使用Visual Studio Community 2017中的XAML设计器设计UI。

我添加了一些行和列,到目前为止,一切正常,但是让我烦恼的是,我正在处理的区域(即,正在进行的UI的视图)仅填充了Designer窗口的一部分。

白色区域仅填充设计器窗口的一部分

如何使白色区域(代表UI)填充整个设计器窗口?

*******************************************更新********** *************************

根据要求,我在下面添加了XAML代码。 (但是,我认为XAML代码无关紧要。我正在寻找的是IDE中的菜单选项,以使UI表示填充设计器窗口。我可以在设计器左下方的不同百分比之间进行选择但是,这会使UI表示太大或太小。我正在寻找的是正在进行中的UI的全窗口视图。)

<Page
x:Class="App2.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:App2"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" Width="405.333">

<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" 
Margin="-1444,-3849,-1427,2880">

   <Grid.ColumnDefinitions>
        <ColumnDefinition Width="160"/>
        <ColumnDefinition/>
        <ColumnDefinition Width="160"/>
    </Grid.ColumnDefinitions>

    <Grid.RowDefinitions>
        <RowDefinition Height="140"/>
        <RowDefinition/>
        <RowDefinition Height="160"/>
    </Grid.RowDefinitions>

   <Button Content="Button" HorizontalAlignment="Left" Margin="10,0,0,0" 
    Grid.Row="2" VerticalAlignment="Top" Height="42" Width="140"/>


</Grid>
</Page>

在设计器的左下方,您将找到以下组合框:

在此处输入图片说明

在设计器中选择所需的内容,然后按“适合选择”。 然后它将填充整个空间。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM