/// <summary>
/// Removed the TabPanel control from the base.
/// </summary>
/// <param name="control">Object of type TabPanel</param>
protected override void RemovedControl(Control control)
{
TabPanel controlTabPanel = control as TabPanel;
if (control != null && controlTabPanel.Active && ActiveTabIndex < Tabs.Count)
{
EnsureActiveTab();
}
controlTabPanel.SetOwner(null);
base.RemovedControl(control);
}