FIX. RadCollapsiblePanel - child controls are not visible in the Document Outline window in Visual Studio

If you add a RadCollapsiblePanel to a form in design time, then add some child controls in its control container, then open the Document Outline window, you will see that the child controls are not visible in the Document Outline.
Workaround: There is a workaround which involves creating an inherited RadCollapsiblePanel and assigning it with a custom designer:
[Designer(typeof(MyCollapsiblePanelDesigner))]
class MyCollapsiblePanel : RadCollapsiblePanel
{
public override string ThemeClassName
{
get
{
return typeof(RadCollapsiblePanel).FullName;
}
set
{
base.ThemeClassName = value;
}
}
}
class MyCollapsiblePanelDesigner : RadControlDesignerLite
{
public override void Initialize(System.ComponentModel.IComponent component)
{
base.Initialize(component);
this.EnableDesignMode((this.Control as RadCollapsiblePanel).ControlsContainer, "ControlsContainer");
this.EnableDesignMode((this.Control as RadCollapsiblePanel).PanelContainer, "PanelContainer");
}
public override ControlDesigner InternalControlDesigner(int internalControlIndex)
{
return this.DesignerHost.GetDesigner((this.Component as RadCollapsiblePanel).PanelContainer) as ControlDesigner;
}
public override int NumberOfInternalControlDesigners()
{
return 1;
}
protected override RadControlDesignerLiteActionList CreateActionList()
{
return new RadCollapsiblePanelActionList(this);
}
}
Note that you would need to add references to the System.Design and Telerik.WinControls.UI.Design assemblies in order for the workaround to build. After you build it successfully, you can use the MyCollapsiblePanel component from your toolbox and you will be able to see the child controls in the document outline.