xaml - 如何在 Xamarin.Forms 中使用 TableView?
问题描述
我对 Xamarin.Forms 的世界比较陌生,并且对 Xamarin TableView 有疑问。
我想创建一个类似于下图的布局。
问题是,我可以为此使用TableView还是有其他选择?任何人都可以用 XAML 代码显示这个吗?
提前致谢。
编辑:底部的标签不是必需的。
解决方案
我并不是要粗鲁,但这很容易从文档页面中检索到,并且自己尝试一下。
为了让你开始,试试这个:
<TableView Intent="Settings">
<TableView.Root>
<TableView.Section>
<ImageCell Text="Invoice Customization" Source="Invoice_image.png" />
<ImageCell Text="Invoice Defaults" Source="Invoice_image.png" />
</TableView.Section>
<TableView.Section Title="Security">
<SwitchCell Text="Use Touch ID" />
</TableView.Section>
... etc.
</TableView.Root>
</TableView>
开箱即用的 Xamarin.Forms 无法使用单元格末尾的箭头和安全部分下方的页脚文本,这可能需要您编写自定义渲染器。
推荐阅读
- python - 我是 python 新手,我偶然发现了一个函数/变量?我不知道它是做什么的,有人可以解释一下吗?
- python - 如何在模板的类中显示函数的循环?
- reporting-services - 如何查找 SSRS 报告的最后部署日期
- c# - WPF Datagrid:根据单元格值为整行或行中的第一个单元格着色
- android - 自定义可绘制状态
- php - PHP 中 Iconomi API 中的身份验证
- microcontroller - int32_t 用于 32 微控制器中的堆栈
- linux - 大对齐的 mmap
- javascript - 如何将我的字符串输出转换为对象,以便使用 javascript 将 json 作为输出?
- docker - .Net Core Kafka 消费者总是返回 null