首页 文章

如何在Xamarin.Forms中使用TableView?

提问于
浏览
0

我对Xamarin.Forms的世界相对较新,并对Xamarin TableView有疑问 .

我想创建一个类似于下面所示的布局 .

问题是,我可以使用TableView,还是有另一种选择?任何人都可以用XAML代码显示这个吗?

提前致谢 .

编辑:底部的标签不是必需的 .

1 回答

  • 2

    我不是故意粗鲁,但这很容易从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开箱即用,这可能需要您编写自定义渲染器 .

相关问题