Hi Ole-Johan,
Thanks for your interests in Syncfusion products.
First I will try explaining you the basic difference between the User Control and the InheritedUserControls. Though the Inherited Controls and User Controls conceptually both can be grouped under Custom Controls category, but there is a difference between Inherited User Controls and User Controls in a practical implementation
Inherited User controls are those existing controls that you would inherit to add custom functionalities. E.g. Wizard, MonthCalendarAdv which typically inherits the System.Windows.Forms.UserControl(in the source) but you could see the implementation of this control as something like
public class CustomizationPanel : System.Windows.Forms.UserControl
{
..
..
}
the control which has the parent as System.Windows.Forms.UserControl are populated when you add the Tools.Windows assembly in the Inherited user control dialog. That is the reason the TreeView is not shown as it is not inherited from a user control. Usually these are used for common validations, GUI features etc.
Solution for your requirement:If your requirement is to extent our controls with some common application logic. Make the modifiers public, protected, add some revalidations. You can make use of a UserControl or a custom class and inherit our control. I will explain a small scenario where I tried to extend the TreeViewAdv in the TreeViewAdvExt(a new control), use that object as a new control and try populating it. Kindly make use of the code snippet for more idea.
//Extended a new control keeping the TreeViewAdv as base.
public partial class TreeViewAdvExt : TreeViewAdv
{
public TreeViewAdvExt()
{
InitializeComponent();
}
//implemented a new method to override the Vertical scrolling.
public void SetVScroll(bool value)
{
base.VScroll = value;
}
}
In my application.
//Created an instance of the new control.
treeviewadv1 = new TreeViewAdvExt();
//set its vertical scrolling to False.
treeviewadv1.SetVScroll(false);
Please find the below sample which explains the above.
http://files.syncfusion.com/support/Tools.Windows/7.1.0.30/Forum-88734/main.htmWe hope we are clear enough to your question. Please let us know still if you have any queries.
Regards,
Bala.