One*_*iva 13 c# xaml xamarin-forms
我正在尝试在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>
Run Code Online (Sandbox Code Playgroud)
Dan*_*rda 56
ListView.RowHeight在ListView本身上具有相同的大小设置属性ViewCell.Height而不是设置ListView.HasUnevenRows为true(但它有一些性能影响)现在将2019年的正确性放在固定高度上:
<ListView RowHeight="100" />
Run Code Online (Sandbox Code Playgroud)
如果您不希望所有行都固定高度,请使用:
<ListView HasUnevenRows="true" />
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
18795 次 |
| 最近记录: |