Hi I am having a look at the source code of Infragistics.CompositeUI.WinForms and I am able to dynamically add/remove:
by using the UI Extensions provided by you guys. What I can't really do, or maybe I don't know how to do it, is to add items on the menu of the Ribbon, you know the menu that appears when you click the big circle on the Ribbon?
How I can do that, what is the controls that hold the toolbase controls in that menu? I didn't find any example for that.
The UIExtensionSite is Ribbon.ApplicationMenu.ToolAreaLeft.Tools.
You have to register this extesion site:
RootWorkItem.UIExtensionSites.RegisterSite("ApplicationMenu", Shell.Ribbon.ApplicationMenu.ToolAreaLeft.Tools);
Then you can add ButtonTools in your modules:
ButtonTool testButton = new ButtonTool("Test");testButton.SharedProps.Caption = "Test!";testButton = WorkItem.UIExtensionSites["ApplicationMenu"].Add(testButton);WorkItem.Commands["Test"].AddInvoker(testButton, "ToolClick");
Then you add the command handler:
[CommandHandler("SyncNow")]public void OnSyncNow(object sender, EventArgs eventArgs){ MessageBox.Show("Test!");}
Hope this helps!
Emanuel