Reworked PrepareContainerForItemOverride

Stole some "PrepareContainerForItemOverride" code from MetroTabControl.cs.