ToolBars in WPF


#1

Creating a Toolbar needs to generate a Rui File.

  1. I didn’t find a function in C# to create directly my own toolbars from Code.
  2. If that would be possible do you think we could use WPF?

Perhaps the best way is to use the docking panels


Programatically creating and managing custom toolbars in C++
(Menno Deij - van Rijswijk) #2

The RUI files are the most easy way to do this, and adhere in the best way to the Rhino UI experience. Because everything is a (set of) command(s) in Rhino, your buttons should call your commands. I would recommend you to follow this paradigm.

A docking panel in WPF is doable, but you need to wrap it into a WindowsForms WpfElementHost; docking panels only accept WinForms controls.


(Dale Fugier) #3

If you want to create Rhino-style toolbars, then use Rhino’s Toolbar command. You can save your custom toolbars in your own Rhino User Interface (RUI) file. For details on creating toolbars, see the Rhino help file.

More on creating and deploying toolbars: