【发布时间】:2011-07-11 22:29:18
【问题描述】:
简单的问题,我有一个带有工具栏和列表框的堆栈面板,我希望列表框填充剩余空间,但它不会。这是我目前拥有的。
<Window x:Class="TestClientMainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Testing client" Height="350" Width="525"
DataContext="{StaticResource ResourceKey=TheViewModel}" Background="#FFD4BFBF">
<Grid>
<StackPanel HorizontalAlignment="Stretch" Name="stackPanel1" VerticalAlignment="Stretch">
<ToolBar Height="26" Name="toolBar1" />
<ListBox Name="listBox1" VerticalAlignment="Stretch" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" MinHeight="{Binding ElementName=stackPanel1, Path=Height}" Height="99" />
</StackPanel>
</Grid>
【问题讨论】:
标签: wpf xaml stackpanel