private void Remove(TabPage page) { if (page != null) { var index = pages.IndexOf(page); if (index >= 0) { RemoveTab(index, page); } } }
public override void Remove(Control child) { var childPage = child as TabPage; if (childPage != null) { var index = pages.IndexOf(childPage); if (index >= 0) { RemoveTab(index, childPage); RemoveParent(childPage, true); } } }