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;
};
}
}
}
最新文章
- CSS伪类选择器
- CSS属性[text-overflow]使用问题
- uva10020 贪心
- JDBC中Statement接口提供的execute、executeQuery和executeUpdate之间的区别
- [0] Visual studio 2010 快捷键大全
- 纯js实现DIV拖拽
- MYSQL常见运算符和函数
- MIME 参考手册
- MySQL中KEY、PRIMARY KEY、UNIQUE KEY、INDEX 的区别
- shiro实战系列(五)之Authentication(身份验证)
- jQuery:find()方法与children()方法的区别
- Swift动态添加UIImageView并添加事件
- 数据库实例: STOREBOOK >; 表空间 >; 编辑 表空间: USERS
- 【JS】一款好用的JS日历选择插件【bootstrap-datetimepicker.js】
- linux及安全《Linux内核设计与实现》第三章——20135227黄晓妍
- java并发编程实战笔记---(第四章)对象的组合
- ConcurrentDictionary 与 Dictionary
- Flash Builder 相关
- SqlServer——for xml path
- 记一次防火墙导致greenplum装机失败及定位修复过程
热门文章
- 关于DP与背包
- Django日志器的使用
- Android 设置图片透明度
- 【HDU5748】Bellovin
- [Angular] Create a custom pipe
- js进阶 9-12 js如何实现级联菜单 (章节测试)
- 编辑框等控件边框美化(继承CEdit,然后覆盖OnMouseLeave, OnSetFocus, OnPaint函数即可。原来的CEdit虽然代码不可见,但它也是有句柄的,照样随便画)
- 使用蒲公英来发布iOS内侧版本
- sql server中触发器
- Eclipse迅速执行:Exception in thread &;quot;main&;quot; java.lang.OutOfMemoryError: Java heap space