|I've often had a need for a tabbed browser that is a little nicer than just tab pages, and liked the Windows Media Player style. After seeing the control included with the latest Visual Studio 2005 releases, I got the urge to replicate it as it not only did what I wanted but looked really nice.|
I first tried inheriting from TabControl and doing my own drawing, but quickly realized the limitations of the control (mainly due to the fact that it's just a wrapper around the Win32 version). This final version is inherited from a UserControl, and since I am lazy it is not as nice as a TabControl, but since its use is different I felt it was ok; rarely will tabs be removed, reordered, etc.
Another design decision I made was to use Label controls to do the text drawing as opposed to just using DrawString. The reason for this is that I love text smoothing, and DrawString doesn't cut it. Either you don't have it, or you force a weak version of it, and that doesn't work when the user is expecting services like ClearType to extend to all of their applications. So, because I used Labels, the system settings will act on the text just like normal.
As it stands, the control is usable and works well, although there is some work that still needs to be done. See the todo list below for more information. Funny thing is that the real control doesn't allow keyboard navigation either - so I don't feel so bad about being too lazy to implement it ;)
The only two differences between this and the real thing are that the tabs are 1 pixel off in width and the background doesn't change colors to work on non-Luna themes right (it should go white, but it doesn't). Both are insignificant IMHO, as it still looks decent with the grayish background.