Can anybody help me me to Disable/Hide the "Customize Quick Access Toolbar" button on ribbon control next to the TOOLS on ribbon...
Thanks,
Kashif
You can define the class posted above anywhere in your project. Then, after the call to InitializeComponent in the Form's constructor, add the following line:
this.ultraToolbarsManager1.CreationFilter = new MyCreationFilter();
Hi! Can you please tell me where to insert this code.... Am just starting to learn these stuffs.. :)
thanks in advance..
You would need to do this manually by implementing a custom creation filter and assigning an instance of it to the CreationFilter property of the toolbars manager. Here is a filter that should remove the button:
public class MyCreationFilter : IUIElementCreationFilter{ void IUIElementCreationFilter.AfterCreateChildElements( UIElement parent ) { if ( parent is RibbonCaptionAreaUIElement ) { for ( int i = 0; i < parent.ChildElements.Count; i++ ) { if ( parent.ChildElements[ i ] is QatQuickCustomizeToolUIElement ) { parent.ChildElements.RemoveAt( i ); break; } } } }
bool IUIElementCreationFilter.BeforeCreateChildElements( UIElement parent ) { return false; }}