zoukankan      html  css  js  c++  java
  • UniformGrid Building a ColumnMajor UniformGrid in WPF(调整Item方向)

    http://blogs.claritycon.com/blog/2008/11/building-a-column-major-uniformgrid-in-wpf/

    By default, UniformGrid displays it's children as follows:

    1 2 3 

    4 5 6

    7 8 9

    I want to be as follows:

    1 4 7 

    2 5 8

    3 6 9

    ----------------------------------------------------

       1:  <UniformGrid Rows="2" Columns="4">
       2:      <UniformGrid.LayoutTransform>
       3:          <TransformGroup>
       4:              <RotateTransform Angle="90"/>
       5:              <ScaleTransform ScaleX="-1"/>
       6:          </TransformGroup>
       7:      </UniformGrid.LayoutTransform>
       8:      <Button Background="White" Content="1"/>
       9:      <Button Background="Red" Content="2" Foreground="White"/>
      10:      <Button Background="Orange" Content="3"/>
      11:      <Button Background="Yellow" Content="4"/>
      12:      <Button Background="Green" Content="5" Foreground="White"/>
      13:      <Button Background="Blue" Content="6" Foreground="White"/>
      14:      <Button Background="Violet" Content="7"/>
      15:      <Button Background="Black" Content="8" Foreground="White"/>
      16:  </UniformGrid>

    AND

       1:  <Style TargetType="Button">
       2:      <Setter Property="LayoutTransform">
       3:          <Setter.Value>
       4:              <TransformGroup>
       5:                  <RotateTransform Angle="-90"/>
       6:                  <ScaleTransform ScaleY="-1"/>
       7:              </TransformGroup>
       8:          </Setter.Value>
       9:      </Setter>
      10:  </Style>
    ----------------------------------- http://www.cnblogs.com/rock_chen/
  • 相关阅读:
    一步一步本地化部署mapbox-gl
    快速排序
    合并排序
    冒泡排序
    选择排序
    插入排序
    mapbox-gl象形文字字体glyph生成
    前端html
    Mysql练习
    Mysql语句
  • 原文地址:https://www.cnblogs.com/rock_chen/p/2809375.html
Copyright © 2011-2022 走看看