To reproduce: add a RadCollapsiblePanel and insert several controls at run time with specifying the location and size of the inner controls. Set the ContentSizingMode property to CollapsiblePanelContentSizingMode.FitToContentHeight | CollapsiblePanelContentSizingMode.FitToContentWidth. When you run the application you will notice that the inner controls are cut off and the panel is not resized according to its content.
Workaround:
Before:

After:

public RadForm2()
{
InitializeComponent();
this.radCollapsiblePanel1.ContentSizingMode = CollapsiblePanelContentSizingMode.None;
}
private void RadForm2_Load(object sender, EventArgs e)
{
SizeF fillElementSize = this.radCollapsiblePanel1.Size;
int maxY = int.MinValue;
int maxX = int.MinValue;
int maxControlWidth = int.MinValue;
int maxControlHeight = int.MinValue;
bool fitToHeight = true;
bool fitToWidth = true;
Padding panelContainerPadding = this.radCollapsiblePanel1.ControlsContainer.PanelContainer.Padding;
foreach (Control control in this.radCollapsiblePanel1.ControlsContainer.PanelContainer.Controls)
{
if (fitToHeight)
{
maxY = Math.Max(maxY, control.Bounds.Location.Y + control.Bounds.Size.Height + control.Margin.Bottom + panelContainerPadding.Bottom +
this.radCollapsiblePanel1.ControlsContainer.VerticalScrollbar.Value);
maxControlWidth = Math.Max(maxControlWidth, control.Width);
}
if (fitToWidth)
{
maxX = Math.Max(maxX, control.Bounds.Location.X + control.Bounds.Size.Width + control.Margin.Right + panelContainerPadding.Right +
this.radCollapsiblePanel1.ControlsContainer.HorizontalScrollbar.Value);
maxControlHeight = Math.Max(maxControlHeight, control.Height);
}
}
if (fitToHeight)
{
bool horizontalScrollbarNeeded = fillElementSize.Width <= maxY + maxControlWidth;
if (horizontalScrollbarNeeded)
{
this.radCollapsiblePanel1.ControlsContainer.HorizontalScrollBarState = ScrollState.AlwaysHide;
}
else
{
this.radCollapsiblePanel1.ControlsContainer.HorizontalScrollBarState = ScrollState.AutoHide;
}
fillElementSize.Height = maxY;
}
if (fitToWidth)
{
bool verticalScrollbarNeeded = fillElementSize.Height <= maxX + maxControlHeight;
if (verticalScrollbarNeeded)
{
this.radCollapsiblePanel1.ControlsContainer.VerticalScrollBarState = ScrollState.AlwaysHide;
}
else
{
this.radCollapsiblePanel1.ControlsContainer.VerticalScrollBarState = ScrollState.AutoHide;
}
fillElementSize.Width = maxX;
}
fillElementSize.Height += this.radCollapsiblePanel1.CollapsiblePanelElement.HeaderElement.Size.Height + 5;
this.radCollapsiblePanel1.MinimumSize = this.radCollapsiblePanel1.MaximumSize = this.radCollapsiblePanel1.Size = fillElementSize.ToSize();
}