Forum Xamarin Xamarin.Forms

Why does my ViewCell's label text disappear at small row heights in Xamarin Forms?

I am trying to shrink the row size of a ListView in Xamarin that has so far been pretty reliable. The items look like this right now:

enter image description here

However, I now want to shrink them. I adjust the row height, and I get this:

enter image description here

What am I doing wrong? I have the property HasUnevenRows set to true, which seems to be what most questions advise. I have also read about bugs with the ListView on UWP: But I'm developing for Android. Am I missing something fundamental here? Because this doesn't seem as intuitive as it should.

Here is my XAML:

                          ItemsSource="{Binding SummaryItems}"
                                <ViewCell >
                                    <Frame CornerRadius="2.5" Margin="0, 1" VerticalOptions="FillAndExpand">
                                                <RowDefinition Height="*" />
                                                <ColumnDefinition Width="*" />
                                                <ColumnDefinition Width="*" />
                                                <ColumnDefinition Width="*" />
                                                <ColumnDefinition Width="*" />
                                                <ColumnDefinition Width="*" />
                                            <Label Grid.Column="0" VerticalOptions="Center" HorizontalOptions="Center" Text="test"  />
                                            <Label Grid.Column="1" VerticalTextAlignment="Center" HorizontalTextAlignment="Center" Text="{Binding Item2}"  />
                                            <Label Grid.Column="2" HorizontalTextAlignment="Center" Text="{Binding Item3}"  />
                                            <Label Grid.Column="3" HorizontalTextAlignment="Center" Text="{Binding Item4}"  />
                                            <Label Grid.Column="4" HorizontalTextAlignment="Center" Text="{Binding Item5}"  />

Best Answer


Sign In or Register to comment.