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

Nested ListViews don't get rendered

$
0
0

Hi,
I have the following layout:

<ScrollView>
        <ListView ItemsSource="{Binding Days}">
            <ListView.ItemTemplate>
              <DataTemplate>
                <ViewCell>
                    <StackLayout>
                        <Label Text="{Binding Day, StringFormat='{0:dd/MM/yyyy - dddd}'}" x:Name="tbDay" />
                        <BoxView HeightRequest="5" Color="White" />
                        <ListView ItemsSource="{Binding FlatTimeSlots}">
                            <ListView.ItemTemplate>
                                <DataTemplate>
                                    <TextCell Text="FlatTimeSlot" />
                                </DataTemplate>
                            </ListView.ItemTemplate>
                        </ListView>
                    </StackLayout>
                </ViewCell>
              </DataTemplate>
            </ListView.ItemTemplate>
        </ListView>
    </ScrollView>

Every DayViewModel has Day property and FlatTimeSlots which is a collection. I'd like to render the list of all days with nested slots in them. However, the time slots rows don't inflate the parent viewport (maybe because they don't get rendered at all), therefore there's no scroll + no inner content. If I'm rendering just one day without the parent ListView, it renders fine (meaning the FlatTimeSlots is not empty for sure).

What am I doing wrong?

Thank you,
Vadim


Viewing all articles
Browse latest Browse all 91519

Trending Articles



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