How to get instance of Panel that holds content of ItemsControl?
问题 Every ItemsControl has its content stored in Panel right ? We can specify the panel to be used in XAML like this: <ListView Name="LView"> <ListView.ItemsPanel> <ItemsPanelTemplate > <StackPanel/> </ItemsPanelTemplate> </ListView.ItemsPanel> </ListView> My question is how to get instance of Panel that is used in the ItemsPanel property (of type ItemsPanelTemplate ) of the particular ItemsControl ? For example ListView called LView from above code sample? I cannot use Name property or x:Name ,