Nevron Forum

NDockingToolbarCollection Question

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

By Luis Mendes - Wednesday, April 14, 2010

Is there a way to not display some of the toolbars? i.e. I would like to not to display the "Main Menu" and the "Standard" toolbars
By Angel Chorbadzhiev - Wednesday, April 14, 2010

Hello Luis,

You can hide a toolbar by setting its Visible property to false:

nDiagramCommandBarsManager1.Toolbars[1].Visible = false;

Regards,

Angel.

By Luis Mendes - Friday, April 16, 2010

Thank you. Is there a way to disable the right click menu to not to allow the customize toolbar to appear?

Thanks again.

By Angel Chorbadzhiev - Friday, April 16, 2010

Hi Luis,

To disable the context menu of the NDiagramCommandBarsManager you need to set its AllowCustomize property to false and also you have to set AllowHide property to each toolbar to false:

nDiagramCommandBarsManager1.AllowCustomize = false;

NDockingToolbarCollection toolbars = nDiagramCommandBarsManager1.Toolbars;

int nCount = toolbars.Count;

for (int i = 0; i < nCount; i++)

{

    toolbars[i].AllowHide = false;

}

 

Regards,

Angel.

By Luis Mendes - Friday, April 16, 2010

Angel, you are the best, THANKS!!!