I need a function to return something that can either be System.Windows.Controls.Control or System.Windows.Controls.StackPanel.
Ideally it should be an interface thats implemented by both or a baseclass of both of them (I hate using object for this purpose)
The likes of UIElement etc seem to be exclusive to one of 'em only.
Any ideas?
FrameworkElement looks to be your only bet.