0
无论何时我们移动红色分网器,它都不会改变绿柱的尺寸。三列分栅器
<Window x:Class="WpfApplication1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Name="c1" ></ColumnDefinition>
<ColumnDefinition Name="c2" Width="auto" ></ColumnDefinition>
<ColumnDefinition Name="c3" Width="200" ></ColumnDefinition>
<ColumnDefinition Name="c4" Width="auto" ></ColumnDefinition>
<ColumnDefinition Name="c5" Width="200" ></ColumnDefinition>
</Grid.ColumnDefinitions>
<Border Name="t1" Grid.Column="0" Background="Transparent" ></Border>
<Border Name="t2" Grid.Column="2" Background="CadetBlue" ></Border>
<Border Name="t3" Grid.Column="4" Background="Green" ></Border>
<GridSplitter Name="gd1" Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="3" ></GridSplitter>
<GridSplitter Name="gd2" Background="red" Grid.Column="3" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="3"></GridSplitter>
</Grid>
</Window>
其实我需要固定宽度的两列和一个与明星宽度 – poonam
你可以提供你想要从布局得到什么信息? 如果你想固定大小的列当你不需要网格划分器 – trimeyko
我希望我的两列固定宽度,并且可以调整大小,如果用户希望使其宽度自定义 – poonam