Nevron Forum

How can I rearrange toolbar commands

https://www.nevron.com/Forum/Topic8849.aspx

By usyber - Wednesday, December 10, 2014

I have a toolbar command where I like to change the position within the toolbar. The following code does not work:

NDiagramCommand cmd = nDiagramCommandBarsManager1.Commander.Commands.GetCommandFromId((int)DiagramCommand.ToggleSnapToGrid);
nDiagramCommandBarsManager1.Commander.Commands.Remove(cmd);
nDiagramCommandBarsManager1.Commander.Commands.Insert(0, cmd);
By Nevron Support - Friday, December 12, 2014

Hello usyber,

You will need to create custom toolbars builder class like the one described in this post.
The only difference is that instead of using Add method to add the command use Insert to insert the command in desired position.

I hope this helps.