TableView下的Entrycell输入字符时,entrycell失去焦点,只在Android平板上
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="App1.MainPage">
<StackLayout>
<TableView>
<TableRoot>
<TableSection x:Name="TS">
<EntryCell PropertyChanged="EntryCell_PropertyChanged" />
</TableSection>
</TableRoot>
</TableView>
</StackLayout>
</ContentPage>
using Xamarin.Forms;
namespace App1
{
public partial class MainPage : ContentPage
{
public MainPage()
{
InitializeComponent();
}
private void EntryCell_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
{
if (e.PropertyName == EntryCell.TextProperty.PropertyName)
{
Device.BeginInvokeOnMainThread(() =>
{
TS.Add(new TextCell() { Text = "Test" });
});
}
}
}
}
在重置表部分 entrycell 失去焦点