Hey there,
does somebody know how to use a ListView with an ObservableCollection as ItemsSource and a ListView.ItemTemplate with another ListView inside? How can I bind data to the inner ObservableCollection Tariffs nested in TariffDays?
<ListView ItemsSource="{Binding TariffDays}"
SelectedItem="{Binding SelectedTariffDay, Mode=TwoWay}">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<Label Text="{Binding Name}" />
<ListView ItemsSource="{Binding Tariffs}">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<Label Text="{Binding StartTime}" />
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
It's not working at all and I read that this is not working in Xamarin, but how can I achieve this anyway without breaking the rules?
Cheers