zoukankan      html  css  js  c++  java
  • XF 绝对布局

    using System;
    using Xamarin.Forms;
    using Xamarin.Forms.Xaml;

    [assembly: XamlCompilation (XamlCompilationOptions.Compile)]
    namespace App7
    {
        public partial class App : Application
        {
            public App ()
            {
                InitializeComponent();

                var green = new Label { Text = "Green Color", FontSize = 20, TextColor = Color.Black, BackgroundColor=Color.Green, WidthRequest = 200, HeightRequest = 50 };
                var pink = new Label { Text = "Pink Color", FontSize = 20, TextColor = Color.Black, BackgroundColor=Color.Pink, WidthRequest = 200, HeightRequest = 50 };
                var yellow = new Label { Text = "Yellow Color", FontSize = 20, TextColor = Color.Black,BackgroundColor=Color.Yellow, WidthRequest = 200, HeightRequest = 50 };
                var absLayout = new AbsoluteLayout();
                absLayout.Children.Add(green, new Point(80, 100));
                absLayout.Children.Add(pink, new Point(80, 160));
                absLayout.Children.Add(yellow, new Point(100, 370));


                MainPage = new ContentPage { Content=absLayout};
            }

            protected override void OnStart ()
            {
                // Handle when your app starts
            }

            protected override void OnSleep ()
            {
                // Handle when your app sleeps
            }

            protected override void OnResume ()
            {
                // Handle when your app resumes
            }
        }
    }
     

  • 相关阅读:
    ES6 解构
    一些vue的知识点
    CSS选择器
    Django学习--介绍Django
    正则表达式
    ftp命令
    Vim学习指南
    关于ACM与OJ
    brctl命令
    LXC
  • 原文地址:https://www.cnblogs.com/dxmfans/p/9434590.html
Copyright © 2011-2022 走看看