[英]How to create a rounded first and last viewcell in ListView Xamarin Forms?
I want to create a ListView
mentioned in the picture below. 我想创建下图中提到的ListView
。 The problem is that I don't want to create a full rounded ListView
. 问题是我不想创建一个完整的ListView
。 I just want a rectangle shape ListView
Header and the rounded first and last ViewCell
? 我只想要一个矩形的ListView
Header以及舍入的第一个和最后一个ViewCell
? Can anyone tell me how to do that? 谁能告诉我该怎么做?
You can use this type
<ListView x:Name="lstView"
BackgroundColor="White"
HasUnevenRows="True">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<Grid Padding="0,10,0,15">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="10" />
<ColumnDefinition Width="100" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="10" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Image Grid.Column="1" Source="{Binding Image}" />
<StackLayout Grid.Column="2" Orientation="Vertical">
<Label Text="{Binding Title}" TextColor="#f36e22" />
<Label Text="{Binding Text}" TextColor="Black" />
</StackLayout>
<Image Grid.Column="3" Source="{Binding smallImage}" />
</Grid>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.