【发布时间】:2018-12-10 19:38:56
【问题描述】:
我对 Xamarin.Forms 的世界比较陌生,并且对 Xamarin TableView 有疑问。
我想创建一个类似于下图的布局。
问题是,我可以为此使用TableView,还是有其他选择?任何人都可以用 XAML 代码显示这个吗?
提前致谢。
编辑:底部的标签不是必需的。
【问题讨论】:
标签: xaml xamarin xamarin.forms
我对 Xamarin.Forms 的世界比较陌生,并且对 Xamarin TableView 有疑问。
我想创建一个类似于下图的布局。
问题是,我可以为此使用TableView,还是有其他选择?任何人都可以用 XAML 代码显示这个吗?
提前致谢。
编辑:底部的标签不是必需的。
【问题讨论】:
标签: xaml xamarin xamarin.forms
我并不是要粗鲁,但这很容易从documentation pages 中检索到,并且自己尝试一下。
为了让你开始,试试这个:
<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 无法使用单元格末尾的箭头和安全部分下方的页脚文本,这可能需要您编写自定义渲染器。
【讨论】: