In WPF, I need to access the "myControl" from code-behind when it is defined in the Resources section like below
<ListView Name="myListView">
<ListView.Resources>
<Popup x:Key="myPopup" >
<Border>
<StackPanel Orientation="Vertical">
<my:SomeControl Name="myControl" />
</StackPanel>
</Border>
</Popup>
</ListView.Resources>
</ListView>
I am able to find the Popup resource with
Dim p As Popup = myListView.TryFindResource("myPopup")
...but how to continue to access what's inside the Popup, i.e. myControl in this case?