Eigenes ContainerControl, Child Controls nicht in DocumentOutline

Spyke

Premium-User
Hi,
ich habe ein eigenes UserControl erstellt, welches ich in anderen Controls/Forms verwenden kann um Controls draufzuziehen.
Funktioniert auch alles wunderbar außer
das ich die draufgezogenen Controls nicht im DocumentOutline Fenster des VisualStudios sehe, was en bissel blöd ist.

Zu meinem Control:
Code:
[Designer(typeof(XTabControlDesigner), typeof(System.ComponentModel.Design.IDesigner))]
internal partial class XTabControl : UserControl, System.ComponentModel.ISupportInitialize
{
   ....

        [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
        internal TabControl TabControl1
        {
            get { return tabControl1; }
        }

        [DesignerSerializationVisibility(DesignerSerializationVisibility.Content), MergableProperty(false), Editor("System.Windows.Forms.Design.TabPageCollectionEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(System.Drawing.Design.UITypeEditor))]
        public System.Windows.Forms.TabControl.TabPageCollection TabPages1
        {
            get { return tabControl1.TabPages; }
        }

        [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
        internal TabControl TabControl2
        {
            get { return tabControl2; }
        }

        [DesignerSerializationVisibility(DesignerSerializationVisibility.Content), MergableProperty(false), Editor("System.Windows.Forms.Design.TabPageCollectionEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(System.Drawing.Design.UITypeEditor))]
        public System.Windows.Forms.TabControl.TabPageCollection TabPages2
        {
            get { return tabControl2.TabPages; }
        }
}

und der entsprechende Designer:
Code:
internal sealed class XTabControlDesigner : System.Windows.Forms.Design.ParentControlDesigner
{
            public override void Initialize(System.ComponentModel.IComponent component)
            {
                base.Initialize(component);

                XTabControl bc = this.Control as XTabControl;
                if (bc != null)
                {
                    this.EnableDesignMode(bc.TabControl1, "TabControl1");
                    this.EnableDesignMode(bc.TabControl2, "TabControl2");
                }
            }

            public override bool CanParent(System.Windows.Forms.Control control)
            {
                return (control != null);
            }

            public override bool CanParent(System.Windows.Forms.Design.ControlDesigner controlDesigner)
            {
                return ((controlDesigner != null) && (controlDesigner.Control != null));
            }
}

Mein XTabControl selbst hat ein SplitContainer drauf mit jeweils einem TabControl je Panel.
Die TabControls gebe ich über den Designer nach außen weiter damit ich in anderen Controls7Forms entsprechend panels etc. erstellen kann.

Ansonsten hat mein Control noch schnickschnack wie Tabs schließen oder Tabs anzeigen als freie Fenster, was aber nixs mit meinem problem zu tun hat.

Ich vermute mal das im DocumentOutline nixs erscheint weil die draufgezogenen Controls nicht direkt auf meiner Controls Auflistung mit liegen, sit aber nur ne Vermutung.

Wie bekomme ich es nun hin das ich im DocumentOutline die Control/Panels sehe.
ImProperties Window in der Combo erscheint auch alles brav, nur im DocumentOutline nicht.
 
Zurück