WPF中GridSplitter控件的使用
2015-08-24 16:47
162 查看
通过代码来理解 GridSplitter 的用法。
运行结果:
说明:可通过移动中间的蓝色部分的线条改变四个区域的大小。
参考资料:
[code]<Window x:Class="GridSplitter.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1" Height="400" Width="400"> <Grid x:Name="LayoutRoot" Background="White" Width="400" Height="400"> <Grid.RowDefinitions> <RowDefinition MaxHeight="300" MinHeight="100" /> <RowDefinition /> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition MaxWidth="300" MinWidth="100" /> <ColumnDefinition /> </Grid.ColumnDefinitions> <Rectangle Fill="White" Grid.Row="0" Grid.Column="0" /> <Rectangle Fill="Black" Grid.Row="0" Grid.Column="1" /> <Rectangle Fill="Black" Grid.Row="1" Grid.Column="0" /> <Rectangle Fill="White" Grid.Row="1" Grid.Column="1" /> <GridSplitter Grid.Row="1" Grid.ColumnSpan="2" HorizontalAlignment="Stretch" VerticalAlignment="Top" Background="Blue" Height="3" /> <GridSplitter Grid.Column="1" Grid.RowSpan="2" HorizontalAlignment="Left" VerticalAlignment="Stretch" Background="Blue" Width="3" /> </Grid> </Window>
运行结果:
说明:可通过移动中间的蓝色部分的线条改变四个区域的大小。
参考资料:
http://www.cnblogs.com/wsdj-ITtech/archive/2009/07/26/1531207.html
相关文章推荐
- getRectSubPix函数
- 关于Android最佳性能实践——布局优化技巧学习笔记
- 黑马程序员-------Java笔记--------网络编程(UDP与TCP基本步骤)
- 请求转发和重定向
- 怎么了
- [LeedCode OJ]#136 Single Number
- Android 适配
- WPF中GridSplitter控件的使用
- oracle 对现有的表进行列表分区
- AlarmManager关掉进程后不起作用的问题
- notepad++ 批量替换技巧
- CAP定理小议
- C++中的static关键字的总结
- C++中的模板那点事
- 算法题:最长上升子序列
- 使用Xcode DEBUG模式和RELEASE模式
- MFC_解决按下回车键退出程序的问题
- java中执行删除文件操作,要关闭输入输出流
- 玩转Bootstrap(基础) -- (6.导航条基础)
- 【数字概念】阿里苏宁联合:一种商业文明的倒退 63.65 万亿 10.4 万亿 1.68 万亿