zoukankan      html  css  js  c++  java
  • XF 标签和文本控件

    <?xml version="1.0" encoding="utf-8" ?>
    <ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
                 xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
                 xmlns:local="clr-namespace:App17"
                 x:Class="App17.MainPage">
        <StackLayout>        
            <Label x:Name="myLabel" FontSize="Large" Text="hello" FontAttributes="Italic" TextColor="Accent"></Label>
            <Entry x:Name="myEntry" Placeholder="请输入内容" FontSize="Medium" FontAttributes="Bold" PlaceholderColor="DimGray" IsPassword="True"></Entry>
        </StackLayout>
    </ContentPage>

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using Xamarin.Forms;

    namespace App17
    {
        public partial class MainPage : ContentPage
        {
            public MainPage()
            {
                InitializeComponent();
                myEntry.Completed += (s, e) => 
                {
                    Entry entry = (Entry)s;
                    myLabel.Text = entry.Text;
                };
               myEntry.TextChanged += (s, e) => 
               {
                   Entry entry = (Entry)s;
                   myLabel.Text = entry.Text;
               };

            }
        }
    }
     

  • 相关阅读:
    Win7 华硕电脑自带摄像头无法打开 方法思路介绍
    P3520 [POI2011]SMI-Garbage
    二分图的最大匹配(模板)
    #数列分块入门 2
    数列分块入门#1
    线段树(标记下传乘法和加法)
    最小费用最大流
    最大流算法(模板)
    编译器出现/mingw32/bin/ld.exe:Permission denied 错误
    1298 圆与三角形
  • 原文地址:https://www.cnblogs.com/dxmfans/p/9434579.html
Copyright © 2011-2022 走看看