When Microsoft designed the standard Luna
theme for Windows XP, they decided that nobody
would be able to align tab buttons on the left, right or bottom edge of a tab control if they wanted to
use themes. This is not actually a framework bug, since it is well documented—the operating system
itself does not natively support it.
Therefore, it comes as no surprise that tab controls are ugly and broken under all versions of .NET
when their buttons are aligned left, right or bottom.
.NET 2.0 also has a bug which causes the tab control edges to be displayed on the tab page
when the control is drag-resized at runtime. We found that particularily amusing, since we fixed that
exact same bug in VisualStyles almost a year ago.
You can reproduce this bug by anchoring a tab control to a form, and resizing it quickly at runtime.
The VisualStyles Solution
Under the hood, VisualStyles uses its in-memory double buffer with a set of cached, rotated bitmap
images extracted directly from the theme itself to draw the tabs. The result is a flexible control
which supports flicker-free resizing and alignment in all directions, and even nested, rotated tab
controls with transparent backgrounds behind the tab buttons.