0
我有一個WPF MainWindow.xaml其中,則爲已經有兩個列表框,如下一個網格:碼頭WPF列表框到窗口
<Window blah blah >
<Grid>
<Border Grid.Row="1" Grid.Column="0" BorderBrush="DarkGray" CornerRadius="2" BorderThickness="1" >
<Grid Height="Auto" Width="Auto">
<Grid.RowDefinitions>
<RowDefinition Height="35"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Label Grid.Row="0" Grid.Column="0">ListBox 1</Label>
<ListBox x:Name="lvTypes" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Visibility="Visible" Width="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" MinWidth="150" Background="#FFFFFFFF">
</ListBox>
<GridSplitter Grid.Column="0" Grid.RowSpan="2" Width="5"></GridSplitter>
<Label Grid.Row="0" Grid.Column="1">ListBox 2</Label>
<ListBox x:Name="lvObjects" Grid.Column="1" Grid.Row="1" Width="Auto" Height="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" MinWidth="150">
</ListBox>
</Grid>
</Border>
</Grid>
</Window>
它看起來如下:
如何我可以得到電網的右手邊停靠在屏幕和兩個列表框右側是窗口中的平等嗎?
當你說 「屏」,你的意思是「窗口「 –
是我的意思是窗口 –