Eto Control/Layout in a DockBar

I’ve been trying to figure out if/how I can host an Eto control on a DockBar in Rhino. I’m using RhinoCommon. The DockBar has a SetCentralControl method with expects a WindowsForms control.

I’ve seen references in some Eto documentation about a .ToNative method which seems like it would likely do the trick. I can’t find this method with the Eto version that ships with Rhino though. There is a method named AttachNative, but it takes no arguments and returns nothing, so I’m not really sure what it’d doing. The docs weren’t really helpful there.


Hi @bradlcampbell,

You can find a code sample here:


– Dale

Please share an example of how to do this. I am also looking for solutions. :confounded:

In ETO the object you want is called a Panel rather than a DockBar. Given that information (which was not obvious to me), you can look at the samples that Dale references above. So here is the command: rhino-developer-samples/SampleCsEtoPanelCommand.cs at 7 · mcneel/rhino-developer-samples · GitHub

There are a few other files you need in the project: