/// <summary> /// Closes and disposes a <see cref="IPadContent"/>. /// </summary> public void UnloadPad(PadDescriptor content) { PadContentCollection.Remove(content); if (layout != null) { layout.UnloadPad(content); } content.Dispose(); }
public void UnloadPad(FormsDesigner.IPadContent content) { if (content == null) { return; } DockContent dockContent = content.Control as DockContent; if (dockContent == null) { dockContent = content.Control.Parent as DockContent; } dockContent.Close(); PadContentCollection.Remove(content); if (_layout != null) { _layout.UnloadPad(content); } content.Dispose(); }