簡單的問題,我有一個工具欄和列表框的堆棧面板,我希望列表框填充剩餘的空間,但它不會。這是我目前所擁有的。wpf堆棧面板
<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>
你知道哦,我現在該怎麼傻的感覺?我期待StackPanel像DockPanel一樣工作。謝謝你們。 – Ian 2011-03-09 14:17:11