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
            }
        }
    }
     

  • 相关阅读:
    windows下pip安装python module失败
    设置jenkins的邮件通知功能
    jenkins 中 violation使用pylint
    pylint & jenkins
    dracut 基本介绍
    etcdctl 命令介绍
    python
    django --------------------- [必要操作]
    vim
    ssl选购
  • 原文地址:https://www.cnblogs.com/dxmfans/p/9434590.html
Copyright © 2011-2022 走看看