简体   繁体   English

如何在ListView Xamarin Forms中创建舍入的第一个和最后一个视单元?

[英]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? 谁能告诉我该怎么做?

舍入的ViewCell示例图像

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.

相关问题 如何通过索引从 xamarin 形式的 ListView 对象获取访问视单元? - How to get access viewcell by index from ListView object in xamarin forms? 如何从 Xamarin Forms 中的自定义 ViewCell 获取 ListView 项目索引? - How to get ListView item index from custom ViewCell in Xamarin Forms? Xamarin Forms - ListView 中的 iOS 动态 ViewCell 大小 - Xamarin Forms - iOS dynamic ViewCell size in a ListView 如何在Xamarin Forms中的视单元中绑定堆栈布局? - How to bind a stacklayout in a viewcell in Xamarin Forms? 创建列表后,如何更新Xamarin Forms ListView的ViewCell属性? - How can I update a Xamarin Forms ListView's ViewCell properties after the list has been created? Xamarin.Forms中如何获取ListView的ViewCell数据并发送到另一个页面 - How to get ListView's ViewCell data and send it to another page in Xamarin.Forms Xamarin Forms ListView:访问ViewCell的对象数据 - Xamarin Forms ListView: Access to ViewCell's Object data Xamarin.Forms MVVM TapGestureRecognizer 到 ListView 的 ViewCell 中的标签(在部分文件中) - Xamarin.Forms MVVM TapGestureRecognizer to a Label in a ViewCell of ListView (in partial files) 如何在 Xamarin.Forms ListView 中创建手风琴 - How to create an accordion in Xamarin.Forms ListView 如何解决 Xamarin 表单 ListView ViewCell 重叠问题? - How to solve Xamarin Form ListView ViewCell Overlapping Issue?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM