zoukankan      html  css  js  c++  java
  • 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

  • 相关阅读:
    tcp/udp并发(大吞吐量)性能测试工具
    postman prerequest动态加密数据构造
    匹配ip的正则表达式
    通过adb命令保存并重命名截图
    python3 urlencode及urldecode
    Android安全测试工具Drozer coverity fortify
    windows下adb shell命令杀进程方式
    postman批量构造数据
    Android app发热功耗思路
    Jenkins+ant+Jenkins接口持续集成测试配置
  • 原文地址:https://www.cnblogs.com/Ray898/p/5051950.html
Copyright © 2011-2022 走看看