I have a custom ribbon tool that contains a ButtonTool and a MenuTool within it, and I'm having some issues related to the QuickAccessToolbar.
- The user can right click on the ButtonTool and MenuTool within the custom tool and add them to the QuickAccessToolbar, instead of being able to add the custom tool itself to the QuickAccess toolbar.
- The custom tool is in the "Common Tools" dropdown, so it can be added to the QAT that way. But when you right click on the custom tool inside the QAT, it has a grayed out "Add to Quick Access Toolbar" option instead of a "Remove from Quick Access Toolbar".
Also, is there a way to customize the way a tool appears when it is placed in the QAT?
rwalsh said:But when you right click on the custom tool inside the QAT, it has a grayed out "Add to Quick Access Toolbar" option instead of a "Remove from Quick Access Toolbar".
rwalsh said: Also, is there a way to customize the way a tool appears when it is placed in the QAT?
It only happens if you create a custom tool that has ribbon tools within it. The ribbon tools within the custom tool take precedence for mouse input over the custom tool itself. So it looks like I'll just have to change my custom tool not to use any of the Infragistics ribbon tools within in.
And since there's no way to customize how the custom tool looks in the QAT, is there a way to prevent the tool from being added to the QAT at all?
Oh I see. The tools you have are in the visible area of the tool. I was thinking you had them in a popup or something. Then yes clicking on a tool would try to display the menu for that tool. Yes it sounds like it would be best if you didn't contain ribbon tools.
With regards to preventing tools from being able to be added to the QAT, the ribbon tools implement the IRibbonTool interface and return a RibbonToolProxy instance. In the case of our intrinsic tools each tool type returns a thread static singleton instance for that tool type to avoid memory bloat. The RibbonToolProxy class has a CanAddToQat that can be used to prevent a tool from being able to be added to the qat but that won't prevent us from trying to show a context menu for that tool.