/// <summary> /// Disposes of this object. /// </summary> /// <param name="disposing"></param> protected override void Dispose(bool disposing) { if (disposing && _content != null) { _desktopView.RemoveShelfView(this); // make sure to dispose of the control now (dotnetmagic doesn't do it automatically) if (!_content.Control.IsDisposed) { _content.Control.Dispose(); } _content = null; } base.Dispose(disposing); }