Hi ,
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/
Hello Abi,
Thank you for your update on this matter.
In order to remove the customization options for the Quick Access Toolbar tools, a similar behavior as above must be followed. You either need to ensure that you call CreateRestorePoint on the UltraToolbarsManager prior to launching your customization dialog, or you need to ensure that the items in the UltraToolbarsManager.Ribbon.QuickAccessToolbar.Tools collection have the IsStockItem property set to true.
If your users are modifying the Quick Access Toolbar at runtime, you can catch the tool being added by handling the QuickAccessToolbarModified event on the UltraToolbarsManager and add the following code in the event:
var qatTool = ultraToolbarsManager1.Ribbon.QuickAccessToolbar.Tools[e.Tool.Key]; qatTool.IsStockItem = true;
Please let me know if you have any other questions or concerns on this matter.
Hello Andrew,
Now i understand StockItemModificationOptions property. Actually i want to hide the "Show/hide tool","Modify tool"
options for the Quick access tools.
screen shot with the highlighted. Is there a way to hide these optoins.
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.
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.
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?