Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
80
Disable or Hide "Customize Quick Access Toolbar" button on Ribbon
posted

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

Parents
  • 44743
    posted

    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;
     }
    }

Reply Children
No Data