我目前正在使用 xamarin 表单构建混合应用程序。 我正在尝试构建一个 ListView ,它显示带有图标和时间戳的错误。
这是我想重新制作成 xamarin 形式的概念设计。
我使用了 ImageCell
来尝试让带有一些文本的图标正常工作,但现在我想在图标上方(或文本旁边)添加第三个元素(时间),PO 不确定关于那个)
最佳答案
正如@Jason 所说,您应该使用ViewCell
。
应该是这样的:
<ViewCell>
<StackLayout Orientation="Horizontal">
<StackLayout>
<Label HorizontalOptions="Center"
HorizontalTextAlignment="Center"/>
<Image >
</StackLayout>
<Label VerticalOptions="FillAndExpand"
VerticalTextAlignment="Center"
HorizontalOptions="FillAndExpand"/>
</StackLayout>
</ViewCell>
添加您需要的其他属性和绑定(bind),单元格就可以使用了。
关于c# - Xamarin 形成带有图像的 ListView |文字 |时间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49535781/