gpt4 book ai didi

c# - 如何更改 ViewCell 中的高度

转载 作者:可可西里 更新时间:2023-11-01 08:13:50 25 4
gpt4 key购买 nike

我正在尝试更改 listview 上的 ViewCell,但下面的代码对我不起作用:

<DataTemplate>
<ViewCell Height="100">
<StackLayout Orientation="Horizontal">
<Image Source="{Binding Seller.Thumbnail}}" Aspect="AspectFit" />
<StackLayout Orientation="Vertical" >
<Label Text="{Binding CouponName}" FontAttributes="Bold" FontSize="12" />
<Label Text="{Binding EndOffer}" FontSize="11" />
</StackLayout>
</StackLayout>
</ViewCell>
</DataTemplate>

最佳答案

  • 如果所有单元格的大小都相同,请设置 ListView.RowHeight 属性ListView本身
  • 如果您想设置 ViewCell.Height然后将 ListView.HasUnevenRows 设置为 true(但它会对性能产生一些影响)

关于c# - 如何更改 ViewCell 中的高度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30696403/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com