【发布时间】:2015-04-06 00:39:48
【问题描述】:
我有下面的 XAML,我想制作中间网格(绿色)来填充顶部蓝色网格和底部红色网格之间的所有区域。请帮我设置一下
<Window x:Class="WpfApplication1.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Window1" SizeToContent="WidthAndHeight">
<DockPanel MinWidth="600" Background="Gold">
<Grid DockPanel.Dock="Top" Background="Blue" Height="30"></Grid>
<Grid DockPanel.Dock="Top" Background="Chartreuse" MinHeight="100" VerticalAlignment="Stretch"></Grid>
<Grid DockPanel.Dock="Bottom" Background="Red" Height="10" VerticalAlignment="Bottom"></Grid>
</DockPanel>
【问题讨论】: