When adding windows to the dockpanel that need to autohide an exception is thrown (because the tabwidth is 0)
ex: void ProgrammaticalyLoadDockpanel()
{
dockPanel.SuspendLayout(true);
socialCardForm.Show(dockPanel, DockState.DockRightAutoHide);
patientsForm.Show(dockPanel, DockState.DockRightAutoHide);
patientsHistoryForm.Show(dockPanel, DockState.DockRightAutoHide);
dockPanel.ResumeLayout(true, true);
}
sollution: set the TabWidth to 20
protected override AutoHideStripBase.Tab CreateTab(IDockContent content)
{
return new TabVS2005(content) { TabWidth = 20 };
}