Hello,
Please let me know how to customize the ContextMenu of QuickAccessToolbar (under Ribbon of UltraToolbarsManager), so that the buttons "Show Below the Ribbon" and "Minimize the Ribbon" could be removed(or hidden, atleast) from the ContextMenu.
Please note that I don't want to hide the QuickAccessToolbar. I know how to Add Tools in the context menu of QuickAccessToolbar, but how can I remove the above mentioned buttons from it?
- Nazish Kanwal
Nazish,
In order to hide those two options, you will need to handle the UltraToolbarsManager's BeforeToolbarListDropdown event and set the ShowQuickAccessToolbarPositionMenuItem and ShowMinimizeRibbonMenuItem properties off of the EventArgs to False. Please note that this will only work if you have the UltraToolbarsManager's Office2007UICompatibility property set to False.
private void ultraToolbarsManager1_BeforeToolbarListDropdown(object sender, Infragistics.Win.UltraWinToolbars.BeforeToolbarListDropdownEventArgs e) { e.ShowQuickAccessToolbarPositionMenuItem = false; e.ShowMinimizeRibbonMenuItem = false; }
~Kim~
Hi,
I also tried this, but the method to handle the event is not called when loading the form.
An alternative option for me would be to find a way to translate the two text strings to German.
Please let me know how to do that.
I use NetAdvantage 9.2.
Thanks, regards
The BeforeToolbarListDropdown event only applies to the context menu of the Ribbon, so that will not help in this case. There is currently no way to hide those menu items from the QAT. You can customize their strings though by customizing the following resource strings:
MinimizeRibbonQuickAccessToolbarAboveRibbonCustomizeQuickAccessToolbarBelowRibbonCustomize
If you have never customized resource strings, the following help article explains how to do so:
http://help.infragistics.com/Help/NetAdvantage/WinForms/2009.2/CLR2.0/html/Win_Customizing_Assembly_Resource_Strings.html
I succeeded in customize the strings you told about.
But the string ('add to QAT' and 'remove from QAT')
How can i change them?, what are there string 'keys'?. Can i look this up somewhere???
The list of resource strings for the UltraToolbarsManager assembly can be found here: http://help.infragistics.com/NetAdvantage/WinForms/2011.1/CLR2.0/?page=WinToolbarsManager_Resource_Strings.html
To customize the strings you are referring to, you would want to change the AddToQuickAccessToolbar and RemoveFromQuickAccessToolbar strings.