How to make a Listview in table format in Xamarin Forms?

Asked

Viewed 287 times

-1

I need to create a Listview that looks similar to this image, so I have no idea how to do it, because I’ve never used Xamarin, I’m learning in the application that I’m developing. Dessa forma ou parecida deverá ficar o ListView no app

1 answer

0


This was the way I found to be able to create a table similar to the one I published:

<Grid  ColumnSpacing="2">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition />
                        <ColumnDefinition />
                        <ColumnDefinition />
                        <ColumnDefinition />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="50"/>
                        <RowDefinition Height="50"/>
                         <RowDefinition Height="50"/>
                        <RowDefinition Height="50"/>
                    </Grid.RowDefinitions>
                    <Label Text="#" Grid.Row="0" Grid.Column="0" FontAttributes="Bold"/>
                    <ListView x:Name="coluna0" Grid.Column="0" Grid.Row="1"  SeparatorColor="White"
                SeparatorVisibility="Default"/>
                    <Label Text="Colaborador" Grid.Row="0" Grid.Column="1" FontAttributes="Bold"/>
                    <ListView x:Name="coluna1" Grid.Column="1" Grid.Row="1"  SeparatorColor="White"
                SeparatorVisibility="Default"/>
                    <Label Text="Cliente" Grid.Row="0" Grid.Column="2" FontAttributes="Bold" />
                    <ListView x:Name="coluna2" Grid.Column="2" Grid.Row="1"  SeparatorColor="White"
                SeparatorVisibility="Default"/>
                    <Label Text="Duração" Grid.Row="0" Grid.Column="3" FontAttributes="Bold"/>
                    <ListView x:Name="coluna3" Grid.Column="3" Grid.Row="1"  SeparatorColor="White"
                SeparatorVisibility="Default"/>
                </Grid>

Browser other questions tagged

You are not signed in. Login or sign up in order to post.