I am using WPF, and I have written a CustomControl which inherits from a System.Windows.Controls.UserControl, but when I create a new instance of it (CustomControl), and try to add it as a children to a StackPanel, the debugger says that it cannot convert CustomControl to UIElement.
I would guess that UserControl inherits from UIElement itself, so what's going on?
Thanks!