WPF制作类似Winform中的SplitContainer组建效果
RT,求指教~~~
最好有点关键代码,Thks!
[解决办法]
定义一个Grid,比如有3行,在中间一行放一个GridSplitter,这样就可以拖动GridSplitter更改上下两行的高度
<Grid.RowDefinitions> <RowDefinition MinHeight="150" MaxHeight="330" Height="0.6*"/> <RowDefinition Height="Auto"/> <RowDefinition MinHeight="150" Height="0.4*"/> </Grid.RowDefinitions> <GridSplitter Grid.Row="1" HorizontalAlignment="Stretch" VerticalAlignment="Center" ShowsPreview="True" Height="5" />