I want to hide the "All commands","All tabs" from choose command combo in Quick access toolbar customize window . please let me know how to achive this/
I have been investigating into a way to hide the “All Commands” and “All Tabs” options from the Quick Access Toolbar customize menu, and in order to do this, I would recommend first handling the BeforeCustomizationDialogDisplayed event of the UltraRibbonCustomizationProvider. In this event, the event arguments can get you the RibbonCustomizationDialog object that is opening.
From the dialog, you can recursively loop through the Controls collection and look for UltraComboEditor objects. Once you have these, you can use their ValueLists and remove the items that you are looking to remove from them. I am attaching a sample project that demonstrates how this can be done.
Please let me know if you have any other questions or concerns on this matter.
Thanks Andrew, i achieve with your solution. In the Customize QAT window , initially i set
StockItemModificationOptions = StockItemModificationOption.None;
but when selecting the tool from left side, for the selected tool , the
StockItemModificationOptions option is not mapped. which means those selected tool able to modify,remove.Is it possible to control this behaviour.
Thank you for your update on this matter, I am glad you were able to achieve your requirement with the solution provided.
I am rather unsure of what you are referring to by these “StockItemModificationOptions.” I am under the impression that this is one of the tools in your Ribbon, but I am unsure of what behavior you are looking to control? Would it be possible for you to please elaborate a bit further and possibly modify the sample project I sent you to outline this scenario?
Thanks for your update . refer attached screenshot, . here eventhough StockItemModificationOptions set to none, still able to modify,show/Hide.
Is it possible to control this behaviour.
The StockItemModificationOptions apply to the tabs, groups, and tools that have their IsStockItem property set to true. This property is public, but it is not browsable, as the “stock” items are by default, the ones that are created at design-time.
If you want to set the IsStockItem property to true for all tabs, groups, and tools, you can call the CreateRestorePoint() method on the UltraToolbarsManager. Otherwise, while the IsStockItem property will not show in Visual Studio Intellisense as it is not browsable, you can still set it to true programmatically.