I am using Ribbon with a CAB application. We want the Ribbon in a View(not in the shell). but it comes out like in the attached file. with 2 form heads. We want the Ribbon's application menu and not the shells. Is a way to do this? If I put the Ribbon in shell, it comes out fine. but we don't want all toolbar handling in the ShellForm.cs. That is too much code there.
Do u have an good example to look for this? All CAB & Ribbon examples shows how to register Ribbon as UIExtension, but how to handle the clicks?
Thanks,
In the demo I have sent you (see: the post) I have shown you how to respond to click events on the ribbon tool buttons from the module that inserted the tool.
If you have a look at the ModuleController class in the NewToolbar.Module you can see how we hooked the ToolClick event on a ToolButton:
WorkItem.Commands[CommandNames.RibbonFirstButtonClick].AddInvoker(button1, "ToolClick");
The event handler, which in CAB world is called a CommandHandler, you can find in the same ModuleController class:
[CommandHandler(CommandNames.RibbonFirstButtonClick)]
public void OnRibbonFirstButtonClick(object sender, EventArgs eventArgs)
{
MessageBox.Show(string.Format("Raised command's name: {0}", CommandNames.RibbonFirstButtonClick));
}
yes, that one helped a lot. But I can only add tools to ribbon like in runtime, not in design. My question now is:
is it possible i don't register Ribbon as UIExtension? I want it in a view that I can add tools at design but show it in the Shell. So the application button will cover the Shell Form's header.
Thanks, I just copy and paste the one in support request to the first post.