I'm writing code that able user to show my custom palette.
Everything is working fine, but ... I want to make some of my groupbox to be expandable/collapsible, like here (3D visualization):
I think that using groupbox control is bad idea, so how can I make some container with my controls (label and textbox) and make this container expandable/collapsible?
Standard Windows Forms does not have the expand/collapse control, the available GroupBox control is static, not collapsible. WPF has the Expander control that can expand/collapse its panel.
There are many code resources to build a collapsible panel in C# Windows Forms. I found some links (http://visualstudiogallery.msdn.microsoft.com/40b8
I know that GroupBox is a static Window's control.
I didn't know how to name it, so I used "groupbox" and image which shows what I mean - there is lots of this collapsing panel in standard AutoCAD's palettes and I think that under 2007 there wasn't WPF yet.
AutoCAD uses C++ MFC controls in ObjectARX plug-ins to show those collapsible panels in palettes. The used C++ class is CMFCPropertyGridProperty (I guess so). The equivalent control in .NET is PropertyGrid that groups properties in collapsible trees. In Visual Studio Toolbox, look for PropertyGrid and drag it to the user control (that will be placed to the custom palette). The PropertyGrid stores custom properties in group hierarchy, and they can expand/collapse. But it may not allow to add controls like buttons (you can try).
Access a broad range of knowledge to help get the most out of your products and services.