简单的文本输入控件是Entry
使用方式如下:
<Entry x:Name="ScoreEntry" Placeholder="学分" Text="{Binding Score}" />
可以直接放在布局控件内,如StackLayout等,比较方便。
除此之外,还有一个输入控件,EntryCell,这个控件多了一个Label子元素,提示用户输入的内容。可以直接用于账户输入登录信息。不过使用起来较为苛刻,需要放置在TableSection内部实现。
<TableView Intent="Form"> <TableSection> <EntryCell Label="账户" Placeholder="账户" Text="{Binding Username}"></EntryCell> <controls:ExtendedEntryCell IsPassword="True" Label="密码" Placeholder="密码" Text="{Binding Password}"></controls:ExtendedEntryCell> </TableSection> </TableView>
·END·