zoukankan      html  css  js  c++  java
  • xmarin-xmarin.forms中的Grid使用

    <StackLayout>
                <!--行设的是高度,列设的是宽度-->
                <Grid RowDefinitions="25,*,Auto" ColumnDefinitions="Auto,Auto,Auto">
                    <Label Grid.Row="0" Grid.Column="0" Text="0,0" TextColor="Red" HorizontalTextAlignment="Center" BackgroundColor="Yellow" />
                    <Label Grid.Row="0" Grid.Column="1" Text="0,1" TextColor="Red" HorizontalOptions="Center" BackgroundColor="Purple"/>
                    <Label Grid.Row="0" Grid.Column="2" Text="0,2" TextColor="Red" BackgroundColor="Bisque"/>
                    <Label Grid.Row="1" Grid.Column="0" Text="第二行第1列" TextColor="Blue"/>
                    <Label Grid.Row="1" Grid.Column="1" Text="第二行第2列" TextColor="Blue" />
                    <Label Grid.Row="1" Grid.Column="2" Text="第二行第3列" TextColor="Blue"/>
                    <Label Grid.Row="2" Grid.Column="0" Text="2,0" TextColor="Green"/>
                    <Label Grid.Row="2" Grid.Column="1" Text="2,1" TextColor="Green"/>
                    <Label Grid.Row="2" Grid.Column="2" Text="2,2" TextColor="Green"/>
                </Grid>
                
                <!--Margin默认语法(左,上,右,下)-->
                <Grid RowDefinitions="25,*,Auto" ColumnDefinitions="*,*,*" Margin="0,100">
                    <Label Grid.Row="0" Grid.Column="0" Text="居中且块有背景" TextColor="Red" HorizontalTextAlignment="Center" BackgroundColor="Yellow" />
                    <Label Grid.Row="0" Grid.Column="1" Text="字体有背景" TextColor="Red" HorizontalOptions="Center" BackgroundColor="Purple"/>
                    <Label Grid.Row="0" Grid.Column="2" Text="默认居左显示" TextColor="Red" BackgroundColor="Bisque"/>
                    <Label Grid.Row="1" Grid.Column="0" Text="第二行第1列" TextColor="Blue"/>
                    <Label Grid.Row="1" Grid.Column="1" Text="第二行第2列" TextColor="Blue" />
                    <Label Grid.Row="1" Grid.Column="2" Text="第二行第3列" TextColor="Blue"/>
                    <Label Grid.Row="2" Grid.Column="0" Text="2,0" TextColor="Green"/>
                    <Label Grid.Row="2" Grid.Column="1" Text="2,1" TextColor="Green"/>
                    <Label Grid.Row="2" Grid.Column="2" Text="2,2" TextColor="Green"/>
                </Grid>
                <Label Text="当前组织机构"/>
                <Entry Text="{Binding DataOrgName}" />
            </StackLayout>
    View Code

  • 相关阅读:
    基于HttpListener的web服务器
    基于TcpListener的web服务器
    一个简单的web服务器
    c# 6.0新特性(二)
    c# 6.0新特性(一)
    c#之Redis实践list,hashtable
    html5摇一摇[转]
    在Microsoft-IIS/10.0上面部署mvc站点的时候,出现404的错误
    [实战]MVC5+EF6+MySql企业网盘实战(28)——其他列表
    让DELPHI自带的richedit控件显示图片
  • 原文地址:https://www.cnblogs.com/lishidefengchen/p/14569167.html
Copyright © 2011-2022 走看看