0

Why is only one item within my ListView being displayed?

RecentLinks has more than one item within its collection. Yet, only one item gets displayed.

<ListView ItemsSource="{Binding Subscriptions}" >
    <ListView.ItemTemplate>
        <DataTemplate>
            <ViewCell>
                <StackLayout Orientation="Horizontal">

                        <ListView ItemsSource="{Binding RecentLinks}">
                            <ListView.ItemTemplate>
                                <DataTemplate>
                                    <ViewCell>
                                        <Label Text="{Binding Title}" FontSize="Micro" />
                                    </ViewCell>
                                </DataTemplate>
                            </ListView.ItemTemplate>
                        </ListView>
                </StackLayout>
            </ViewCell>

        </DataTemplate>
    </ListView.ItemTemplate>
</ListView>

I know there's multiple items in RecentLinks because I added the following markup, which at runtime, conveyed 3 items:

<Label Text="{Binding RecentLinks.Length}" />

Here's the source code:

Scott Nimrod
  • 11,206
  • 11
  • 54
  • 118
  • 3
    don't nest ListViews – Jason May 06 '18 at 15:35
  • You probably will like to check [this similar case](https://stackoverflow.com/a/48990224/8093394), if you're thinking about to use nested listviews. It's highly discouraged. – Diego Rafael Souza May 06 '18 at 16:01
  • Are you sure it shows only one item? Maybe you have to scroll within the row. Try to give the outer listview a "big" rowheight to check. And yes don't do lv in lv. Prefer a single lv bounds on recentlinks with a grouping per subscription. – François May 06 '18 at 17:06

0 Answers0