private void CreateButtonManager(RibbonAppButton appButton)
        {
            _buttonManager = new ButtonSpecManagerLayoutAppButton((ViewContextMenuManager)ViewManager,
                                                                  this, Redirector, appButton.AppButtonSpecs, null,
                                                                  new ViewLayoutDocker[] { _viewButtonSpecDocker },
                                                                  new IPaletteMetric[] { _ribbon.StateCommon },
                                                                  new PaletteMetricInt[] { PaletteMetricInt.None },
                                                                  new PaletteMetricPadding[] { PaletteMetricPadding.RibbonAppButton },
                                                                  CreateToolStripRenderer,
                                                                  OnButtonSpecPaint);

            _buttonManager.RecreateButtons();
        }
        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                // Must unhook from the palette paint event
                if (_palette != null)
                {
                    _palette.PalettePaint        -= OnPaletteNeedPaint;
                    _palette.BasePaletteChanged  -= OnBaseChanged;
                    _palette.BaseRendererChanged -= OnBaseChanged;
                }

                if (_buttonManager != null)
                {
                    _buttonManager.Destruct();
                    _buttonManager = null;
                }
            }

            base.Dispose(disposing);
        }