WPF GridSpliter 用法
作者:互联网
<Window x:Class="WpfDemo.LAY_OUT_GRID" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="LAY_OUT_GRID" Height="300" Width="300" MinWidth="200" MinHeight="300" MaxWidth="400" MaxHeight="600"> <Grid ShowGridLines="False"> <Grid.RowDefinitions> <RowDefinition Height="25"></RowDefinition> <RowDefinition></RowDefinition> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="150"></ColumnDefinition> <ColumnDefinition Width="Auto"></ColumnDefinition> <ColumnDefinition></ColumnDefinition> </Grid.ColumnDefinitions> <TextBox Grid.ColumnSpan="3"></TextBox> <TextBox Grid.Row="1" TextWrapping="Wrap">ShowsPreview true 鼠标拖动放开时才生效,false 鼠标移动内容就变化</TextBox> <GridSplitter Grid.Row="1" Grid.Column="1" HorizontalAlignment="Center" Width="5" Background="Gray" ShowsPreview="True" ></GridSplitter> <TextBox Grid.Row="1" Grid.Column="2" TextWrapping="Wrap">HorizontalAlignment="Center" 不设置 左右可能拉不动 </TextBox> </Grid> <!--<WrapPanel Orientation="Vertical"> <Button Content="OK" Height="50" Width="50"></Button> <Button Content="OK" Height="50" Width="50"></Button> <Button Content="OK" Height="50" Width="50"></Button> <Button Content="OK" Height="50" Width="50"></Button> <Button Content="OK" Height="50" Width="50"></Button> <Button Content="OK" Height="50" Width="50"></Button> </WrapPanel>--> </Window>
标签:false,鼠标,--,ShowsPreview,时才,用法,GridSpliter,WPF 来源: https://www.cnblogs.com/JerryZhang320/p/15054366.html