private void OnEnabledChanged(object sender, EventArgs e) { if (_buttonManager != null) { // Cast button manager to correct type ButtonSpecNavManagerLayoutHeaderBar headerBarBM = (ButtonSpecNavManagerLayoutHeaderBar)_buttonManager; // Update with newly calculated values headerBarBM.UpdateRemapping(GetRemappingPaletteContent(), GetRemappingPaletteState()); } }
/// <summary> /// Create a manager for handling the button specifications. /// </summary> protected override void CreateButtonSpecManager() { // Create button specification collection manager _buttonManager = new ButtonSpecNavManagerLayoutHeaderBar(Navigator, Redirector, Navigator.Button.ButtonSpecs, Navigator.FixedSpecs, new ViewLayoutDocker[] { _layoutBarDocker }, new IPaletteMetric[] { Navigator.StateCommon.Bar }, new PaletteMetricInt[] { PaletteMetricInt.BarButtonEdgeInside }, new PaletteMetricInt[] { PaletteMetricInt.BarButtonEdgeOutside }, new PaletteMetricPadding[] { PaletteMetricPadding.BarButtonPadding }, new GetToolStripRenderer(Navigator.CreateToolStripRenderer), NeedPaintDelegate, GetRemappingPaletteContent(), GetRemappingPaletteState()); // Hook up the tooltip manager so that tooltips can be generated _buttonManager.ToolTipManager = Navigator.ToolTipManager; }