ComponentFactory.Krypton.Ribbon.VisualPopupQATOverflow.Dispose C# (CSharp) Method

Dispose() protected method

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool true if managed resources should be disposed; otherwise, false.
return void
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                // Ensure the manager believes the mouse has left the area
                ViewManager.MouseLeave(EventArgs.Empty);

                // Remove all child controls so they do not become disposed
                for (int i = Controls.Count - 1; i >= 0; i--)
                    Controls.RemoveAt(0);

                // If this group is being dismissed with key tips showing
                if (_ribbon.InKeyboardMode && _ribbon.KeyTipMode == KeyTipMode.PopupQATOverflow)
                {
                    // Revert back to key tips for selected tab
                    _ribbon.KeyTipMode = KeyTipMode.Root;
                    _ribbon.SetKeyTips(_ribbon.GenerateKeyTipsAtTopLevel(), KeyTipMode.Root);
                }
            }
            base.Dispose(disposing);
        }