I try to make a custom TabControl from scratch (not inherited from the real one), And I try to add the same design-time features as the real one.
-Add controls to tabs containers by drag and drop
-Make the childs TabPages visible in the VisualStudio Document Structure window.
I know I must create a custom Designer class and I have one. It is inherited from ParentControlDesigner
My TabPages are inherited from UserControl (it's not a ContainerControl ??). I have added this attribute to my CustomTabPage control
Nothing works. I tried to make my CustomTabPage control inheriting from Panel but doesn't work.
If I try to override the "OnControlAdded" method a change the parent of added control by my TabPage, when I drag a control over a TabPage, the control come back on the Form. If I don't override this method, the control is added, but directly in the TabControl ... not in the selected tabPage.
Can somebody help me to understand ? or is there an example of how to create the same kind of controls ? Thanks in advance and sorry for my bad english