Hello Samuel,
Following the example in the example application you need to create your own NDiagramButtonCommand and NDiagramCommandBuilder.
The difference is that instead of adding a new toolbar with your command in it just add the command to already existing toolbar:
public override NDockingToolbar[] BuildToolbars()
{
ArrayList toolbars = new ArrayList(base.BuildToolbars());
ArrayList beginGroupCommandIds = new ArrayList(this.BeginGroupCommandIds);
NDockingToolbar toolbar = toolbars[0] as NDockingToolbar; //Getting the first toolbar in toolbars collection.
int commandId = (int)DiagramCommand.LastCommandId + 1;
NCommand command = CreateCommand(commandId, beginGroupCommandIds.Contains(commandId));
if (command != null)
{
toolbar.Commands.Add(command);
}
return (NDockingToolbar[])toolbars.ToArray(typeof(NDockingToolbar));
}
In the code above the custom command is added to the first toolbar.
I hope this helps.
Best Regards,
Nevron Support Team