/// <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) { // Remove our show instance if (_shadow != null) { _shadow.Dispose(); _shadow = null; } } base.Dispose(disposing); // Remove the active view, so the last view element to // have mouse input has a chance to cleanup processing if (ViewManager != null) { ViewManager.ActiveView = null; ViewManager.Dispose(); } // Do we have a delegate to fire when popup is dismissed? if (DismissedDelegate != null) { DismissedDelegate(this, EventArgs.Empty); DismissedDelegate = null; } }