Hello Andrew,
Thank you for getting back to me:
In order to collapse all
GroupElements you have to use only one of the following
GroupStyle:
ExplorerBarStyle or
VisualStudio2005ToolBox. There is a known issue with the
Expanded property of
RadPanelBarGroupElement but you can workaround it by setting the property first to
true and then to
false.
You can manage the size of
ContentPanel by setting its
MinimumSize.
Height and
MaximumSize.
Height property. I have tested a scenario similar to the one you've described by adding
RadListBox to each
ContentPanels with docked state set to
Fill.
Please review the code-block below as reference:
private void Form1_Load(object sender, EventArgs e) |
{ |
this.radPanelBar2.GroupStyle = PanelBarStyles.ExplorerBarStyle; |
//or |
//this.radPanelBar2.GroupStyle = PanelBarStyles.VisualStudio2005ToolBox; |
|
this.radPanelBarGroupElement1.ContentPanel.MinimumSize = new Size(0, 30); |
this.radPanelBarGroupElement1.ContentPanel.MaximumSize = new Size(0, 30); |
|
this.radPanelBarGroupElement2.ContentPanel.MinimumSize = new Size(0, 50); |
this.radPanelBarGroupElement2.ContentPanel.MaximumSize = new Size(0, 50); |
|
this.radPanelBarGroupElement3.ContentPanel.MinimumSize = new Size(0, 120); |
this.radPanelBarGroupElement3.ContentPanel.MaximumSize = new Size(0, 120); |
|
foreach(RadPanelBarGroupElement panel in this.radPanelBar2.Items) |
{ |
panel.Expanded = true; |
panel.Expanded = false; |
} |
} |
I hope this helps. If this does not exactly suite to your scenario, please send me an example project and describe what you want to achieve. It will help me to understand your case and provide you with further assistance.
Best wishes,
Martin Vasilev
the Telerik team