Got a WPF Form with a StackPanel containing Expanders with StackPanels in it.
If I understand You correctly you can use this LINQ Expression
var w = tmpList.Where(x=>x.IsTypeOf(StackPanel)).SingleOrDefault();