I want to dynamically populate a TableView which is hosted inside a ViewCell of a ListView. The purpose is to render the control visible or invisible to allow the user to hierarchically browse the ListView. So when the user taps a ListView entry, I will populate the TableView dynamically and make it visible to render the subview
But how do I find the current topicTableView control inside the ViewCell of the ListView for the currently selected row?
<ListView x:Name="categoryListView" ItemsSource="{Binding CategoryViewModels}"
HasUnevenRows="True"
Margin="20,40"
ItemTapped="CatagoryListView_OnItemTapped">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<StackLayout Orientation="Vertical">
<Label
Margin="0,20"
Text="{Binding Name}"/>
<TableView
x:Name="topicTableView"
HasUnevenRows="True"
IsVisible="True"/>
</StackLayout>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
This is the closest I found to anything that addresses this problem, but it discusses the solution with a ListBox and not a ListView. It traversed the tree of controls using the VisualTreeHelper, but since I am only interested in the currently selected row, it should be constant time to find the generated TreeView.