• WPF用Grid分隔窗体


    网上找的一段非常好的WPF的代码

    Grid Name="gridMain">
    <Grid.ColumnDefinitions>
    <ColumnDefinition Width="30*" />
    <ColumnDefinition Width="70*" />
    </Grid.ColumnDefinitions>
    <Label Background="LightBlue" VerticalContentAlignment="Center" HorizontalContentAlignment="Center"
    Grid.Row="0" Grid.Column="0">
    Column1
    </Label>
    <GridSplitter Width="5" VerticalAlignment="Stretch" HorizontalAlignment="Right" />
    <Label Background="LightGreen" VerticalContentAlignment="Center" HorizontalContentAlignment="Center"
    Grid.Row="0" Grid.Column="1">
    Column2
    </Label>
    <Grid Name="gridRightColumn" Grid.Row="0" Grid.Column="1">
    <Grid.RowDefinitions>
    <RowDefinition />
    <RowDefinition />
    </Grid.RowDefinitions>
    <Label Grid.Row="0" Grid.Column="0" Width="60" Height="60" HorizontalAlignment="Center"
    VerticalAlignment="Center" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"
    Background="HotPink">
    Row1
    </Label>
    <Grid Grid.Row="0" Grid.Column="0">
    <Grid.RowDefinitions>
    <RowDefinition />
    <RowDefinition />
    </Grid.RowDefinitions>
    <Grid.ColumnDefinitions>
    <ColumnDefinition />
    <ColumnDefinition />
    </Grid.ColumnDefinitions>
    <TextBlock Grid.Row="0" Grid.Column="0" HorizontalAlignment="Center" VerticalAlignment="Center">Cell11</TextBlock>
    <TextBlock Grid.Row="0" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center">Cell12</TextBlock>
    <TextBlock Grid.Row="1" Grid.Column="0" HorizontalAlignment="Center" VerticalAlignment="Center">Cell21</TextBlock>
    <TextBlock Grid.Row="1" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center">Cell22</TextBlock>
    <GridSplitter Width="5" Grid.RowSpan="2" VerticalAlignment="Stretch" HorizontalAlignment="Right" />
    <GridSplitter Height="5" Grid.ColumnSpan="2" HorizontalAlignment="Stretch" VerticalAlignment="Bottom" />
    </Grid>
    <GridSplitter Height="5" HorizontalAlignment="Stretch" VerticalAlignment="Bottom" />
    <Label Grid.Row="1" Grid.Column="0" Width="60" Height="60" HorizontalAlignment="Center"
    VerticalAlignment="Center" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"
    Background="HotPink">
    Row2
    </Label>
    </Grid>

    原文地址:http://www.cnblogs.com/Ray898/articles/5051584.html

  • 相关阅读:
    不定义JQuery插件,不要说会JQuery
    .net深入体验与实战精要--ASP.NET开发大杂烩(转)
    iis7/7.5设置上传文件最大大小
    javascript禁止复制网页内容,兼容三大浏览器
    如何将控制台程序包装成windows服务
    Js获取当前日期时间及其它操作
    JS控制图片拖动 放大 缩小 旋转 支持滚轮放大缩小 IE有效
    js实用功能
    zen-Coding的使用
    使用 MyEclipse远程调试 Java 应用程序
  • 原文地址:https://www.cnblogs.com/Ray898/p/5051950.html
走看看 - 开发者的网上家园