Hi,
I am looking for a way to prevent certain tools and Ribbon Groups from being added to the QAT. I thought I might attach to the Cloned event and then remove the clone from the QAT, but this does not work for Groups. What is the best way to do this?
Thanks
Unfortunately there is a public property to prevent a RibbonGroup/Tool from being added to the qat. You can prevent a tool from being added to the QAT by deriving from it, reimplementing the IRibbonTool interface and returning a derived RibbonToolProxy that returns false from its CanAddToQat. This is normally done if you have a tool type that shouldn't be put into the qat. However there is no mechanism for preventing a group from being added to the qat. The Microsoft Office UI Guidelines require that a tool or group must provide the option to add that item to the QAT.
I am having the same issue and was going to try the solution above, but RibbonToolProxy has an internal default constructor and thus can not be inherited from. Are there any other approaches for this?
Currently I am implementing the Recent Files part of our Application Menu. I am adding MenuTools to it and right now you can right click on any of the recent items and add them to the QAT. This is silly, and is not allowed in Microsoft Office either and I am trying to figure out how to prevent this.
Is there perhaps a tool other than MenuTool that is intended for use in the recent files area? One which supports using _ for underlined shortcuts (as MenuTool does) but also supports pinning as in Office 2007?