Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 89864

ListView shows empty rows.

$
0
0

I do have list view in my Xamarin Forms Application.

XAML Code:

<ListView x:Name="ItemsListView" VerticalOptions="FillAndExpand"
    HasUnevenRows="true" IsPullToRefreshEnabled="true" SeparatorVisibility="None"
    Refreshing="ItemsListView_Refreshing" ItemSelected="ItemsListView_ItemSelected">
    <ListView.ItemTemplate>
        <DataTemplate>
            <ViewCell>
                <Frame Style="{DynamicResource CorneredFrame}">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>

                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="8" />
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>

                        <BoxView Grid.Row="0" Grid.Column="0" Grid.RowSpan="3" BackgroundColor="{Binding EventColorCode}" />
                        <Label Grid.Row="0" Grid.Column="1" Text="{Binding NotificationSubject}" Margin="5,5,5,0" FontAttributes="Bold" FontSize="{DynamicResource Medium}" />
                        <Label Grid.Row="1" Grid.Column="1" Text="{Binding NotificationText}" Margin="5,0,5,0" FontSize="{DynamicResource Small}" />
                        <Label Grid.Row="2" Grid.Column="1" Text="{Binding CreatedAt, StringFormat='{}{0:dd MMM, yyyy hh:mm tt}'}" Margin="5,0,5,5" FontSize="{DynamicResource VerySmall}" />
                    </Grid>
                </Frame>
            </ViewCell>
        </DataTemplate>
    </ListView.ItemTemplate>
</ListView>

Output:

I do not know why it is showing empty rows.


Viewing all articles
Browse latest Browse all 89864

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>