• 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

  • 相关阅读:
    HDFS工作流程
    HADOOP 安全模式
    Hadoop环境的搭建
    面向对象-绑定与非绑定方法
    面向对象-封装
    面向对象-继承与派生
    面向对象-多态与多态性
    面向对象-绑定方法
    LOL游戏基本代码
    1 面向对象的程序设计
  • 原文地址:https://www.cnblogs.com/lishidefengchen/p/14569167.html
Copyright © 2020-2023  润新知