In my previous blog Rhino C# Development (III) : Add Winform UI to Rhino, I demonstrated how to create a dock bar with Winform User controls in Rhino3D.
In this blog I am to demonstrate how to use a similar approach to create Rhino panels, and then dock the panels side-by-side. Rhino panels, are tabbed containers where collection of controls can be hosted, as shown below.
To create such a panel, in Visual Studio, add a user control in the plugin project. If you don’t know how to create such a plugin project, refer to my previous blogs for details.
- Rhino C# Development (I) : Get Visual Studio Wizard ready
- Rhino C# Development (II) : HelloRhino
- Rhino C# Development (III) : Add Winform UI to Rhino
- Rhino C# Development (IV) : Using new RhinoCommon API to develop Rhino3D .net plugins
In this example, a UserControl called GeometryPanel is inserted into the project, and a few simple winform controls are added for illustrative purposes. Add a Guid attribute to the UserControl, as shown below.
public class MyPanelCommand : Command
Instance = this;