Hi,
I am building a Rhino plugin in CSharp/Dot net.
This plugin creates dockbars similarly to SampleCsDockBar project.
I need my dockbar to be docked to the right, with a specific width.
How can I achieve that?
I am not happy with the solutions to Resize docked panel from code and Automatic Resize Behavior for DockBar in WPF Plugin
I was able to get it docked to the right easily:
But I cannot set the width. Things I’ve tried after the creating of the DockBar:
MyDockBar.Dock(DockBarDockLocation.Right, new System.Drawing.Rectangle(0, 0, 400, 600));
((WpfHost)MyDockBar.WinFormsContent).ClientSize = new System.Drawing.Size(400, 600);
((WpfHost)MyDockBar.WinFormsContent).Bounds = new System.Drawing.Rectangle(0, 0, 400, 600);
((WpfHost)MyDockBar.WinFormsContent).Width = 500;
Things I’ve tried before the creation of the DockBar:
public MyDockBar() : base(MyPlugIn.Instance, BarId, "Stage selection")
{
WpfHost host = new WpfHost(new MyPluginView(), null);
host.MinimumSize = new System.Drawing.Size(400, 100);
SetContentControl(host);
}
Is there a way to change the width?
I am also open to simulating mouse click-drag-release if that’s the only solution.
This plugin is intended to be used in-house by several users. I am also open to updating user settings/configuration if I can save the dockbar position and size.